use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class Neo4jSessionOperationTraceInterceptor method afterTrace.
@Override
public SpanRecord afterTrace(Advice advice) {
Object[] args = advice.getParameterArray();
String methodName = advice.getBehaviorName();
Object target = advice.getTarget();
Object result = advice.getReturnObj();
SpanRecord record = new SpanRecord();
record.setService(target.getClass().getName());
record.setMethod(getMethodName(methodName, args));
record.setRequest(args);
record.setResponse(result);
record.setResultCode(ResultCode.INVOKE_RESULT_SUCCESS);
return record;
}
use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class JedisInterceptor method afterTrace.
@Override
public SpanRecord afterTrace(Advice advice) {
Object result = advice.getReturnObj();
SpanRecord record = new SpanRecord();
record.setResponse(result);
record.setResultCode(ResultCode.INVOKE_RESULT_SUCCESS);
record.setMiddlewareName(RedisConstants.MIDDLEWARE_NAME);
attachment(advice, 0);
return record;
}
use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class JedisInterceptor method exceptionTrace.
@Override
public SpanRecord exceptionTrace(Advice advice) {
SpanRecord record = new SpanRecord();
record.setResponse(advice.getThrowable());
record.setResultCode(ResultCode.INVOKE_RESULT_FAILED);
record.setMiddlewareName(RedisConstants.MIDDLEWARE_NAME);
return record;
}
use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class JedisInterceptor method beforeTrace.
@Override
public SpanRecord beforeTrace(Advice advice) {
Object[] args = advice.getParameterArray();
String methodName = advice.getBehaviorName();
Object target = advice.getTarget();
SpanRecord record = new SpanRecord();
record.setService(methodName);
record.setMethod(methodName);
record.setRequestSize(0);
Client client = getClient(target);
record.setRemoteIp(client.getHost());
record.setPort(client.getPort());
// record.setCallbackMsg(client.getDB()+"");
record.setRequest(toArgs(args));
record.setMiddlewareName(RedisConstants.MIDDLEWARE_NAME);
return record;
}
use of com.pamirs.pradar.interceptor.SpanRecord in project LinkAgent by shulieTech.
the class ChannelNBasicPublishInterceptor method afterTrace.
@Override
public SpanRecord afterTrace(Advice advice) {
Object[] args = advice.getParameterArray();
if (args == null || args.length == 0) {
return null;
}
SpanRecord record = new SpanRecord();
return record;
}
Aggregations