use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class DubboConsumerInterceptor method exceptionTrace.
@Override
public SpanRecord exceptionTrace(Advice advice) {
final RpcInvocation invocation = (RpcInvocation) advice.getParameterArray()[0];
final String name = getInterfaceName(invocation);
if (isShentongEvent(name)) {
return null;
}
SpanRecord record = new SpanRecord();
record.setResponseSize(0);
record.setResponse(advice.getThrowable());
record.setResultCode(DubboUtils.getResultCode(advice.getThrowable()));
return record;
}
use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class DubboProviderInterceptor method exceptionTrace.
@Override
public SpanRecord exceptionTrace(Advice advice) {
SpanRecord record = new SpanRecord();
RpcInvocation invocation = (RpcInvocation) advice.getParameterArray()[0];
final String interfaceName = getInterfaceName(invocation);
if (isShentongEvent(interfaceName)) {
return null;
}
record.setRequest(invocation.getArguments());
record.setResponse(advice.getThrowable());
record.setResultCode(getResultCode(advice.getThrowable()));
return record;
}
use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class AbstractKStreamProcessorProcessInterceptor method afterTrace.
@Override
public SpanRecord afterTrace(Advice advice) {
SpanRecord spanRecord = new SpanRecord();
spanRecord.setResponse(advice.getReturnObj());
return spanRecord;
}
use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class CallInvokeInterceptor method beforeTrace.
public SpanRecord beforeTrace(Advice advice) {
Call call = (Call) advice.getTarget();
final MessageContext messageContext = call.getMessageContext();
String operationName = call.getOperationName().toString();
String serviceName = call.getTargetEndpointAddress();
SpanRecord record = new SpanRecord();
record.setService(serviceName);
record.setMethod(operationName);
record.setRequest(messageContext.getMessage());
try {
URI uri = URI.create(serviceName);
String host = uri.getHost();
record.setRemoteIp(host);
record.setPort(uri.getHost());
} catch (Throwable var11) {
}
return record;
}
use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class InvokeInterceptor method afterTrace.
public SpanRecord afterTrace(Advice advice) {
SpanRecord record = new SpanRecord();
record.setMethod(advice.getBehaviorName());
record.setService(advice.getBehaviorName());
record.setRequest(advice.getParameterArray());
record.setResponse(advice.getReturnObj());
return record;
}
Aggregations