mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-16 16:28:48 +10:00
[강운덕] [LUCYSUS-1744] arcus interceptor 타이밍 변경.
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@858 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
+6
-3
@@ -4,6 +4,7 @@ import com.profiler.context.AsyncTrace;
|
||||
import com.profiler.context.GlobalCallTrace;
|
||||
import com.profiler.context.TraceContext;
|
||||
import com.profiler.interceptor.StaticAfterInterceptor;
|
||||
import com.profiler.interceptor.StaticBeforeInterceptor;
|
||||
import com.profiler.util.MetaObject;
|
||||
import com.profiler.util.StringUtils;
|
||||
import net.spy.memcached.protocol.BaseOperationImpl;
|
||||
@@ -15,14 +16,14 @@ import java.util.logging.Logger;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class BaseOperationCancelInterceptor implements StaticAfterInterceptor {
|
||||
public class BaseOperationCancelInterceptor implements StaticBeforeInterceptor {
|
||||
private final Logger logger = Logger.getLogger(BaseOperationCancelInterceptor.class.getName());
|
||||
private MetaObject asyncTraceId = new MetaObject<Integer>("__getAsyncTraceId", null);
|
||||
|
||||
@Override
|
||||
public void after(Object target, String className, String methodName, String parameterDescription, Object[] args, Object result) {
|
||||
public void before(Object target, String className, String methodName, String parameterDescription, Object[] args) {
|
||||
if (logger.isLoggable(Level.INFO)) {
|
||||
logger.info("after " + StringUtils.toString(target) + " " + className + "." + methodName + parameterDescription + " args:" + Arrays.toString(args) + " result:" + result);
|
||||
logger.info("before " + StringUtils.toString(target) + " " + className + "." + methodName + parameterDescription + " args:" + Arrays.toString(args));
|
||||
}
|
||||
|
||||
TraceContext traceContext = TraceContext.getTraceContext();
|
||||
@@ -39,5 +40,7 @@ public class BaseOperationCancelInterceptor implements StaticAfterInterceptor {
|
||||
timeObject.markCancelTime();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
+6
-3
@@ -5,6 +5,7 @@ import com.profiler.context.AsyncTrace;
|
||||
import com.profiler.context.GlobalCallTrace;
|
||||
import com.profiler.context.TraceContext;
|
||||
import com.profiler.interceptor.StaticAfterInterceptor;
|
||||
import com.profiler.interceptor.StaticBeforeInterceptor;
|
||||
import com.profiler.util.InterceptorUtils;
|
||||
import com.profiler.util.MetaObject;
|
||||
import com.profiler.util.StringUtils;
|
||||
@@ -22,15 +23,15 @@ import java.util.logging.Logger;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class BaseOperationTransitionStateInterceptor implements StaticAfterInterceptor {
|
||||
public class BaseOperationTransitionStateInterceptor implements StaticBeforeInterceptor {
|
||||
|
||||
private final Logger logger = Logger.getLogger(BaseOperationTransitionStateInterceptor.class.getName());
|
||||
private MetaObject asyncTraceId = new MetaObject<Integer>("__getAsyncTraceId");
|
||||
|
||||
@Override
|
||||
public void after(Object target, String className, String methodName, String parameterDescription, Object[] args, Object result) {
|
||||
public void before(Object target, String className, String methodName, String parameterDescription, Object[] args) {
|
||||
if (logger.isLoggable(Level.INFO)) {
|
||||
logger.info("after " + StringUtils.toString(target) + " " + className + "." + methodName + parameterDescription + " args:" + Arrays.toString(args) + " result:" + result);
|
||||
logger.info("before " + StringUtils.toString(target) + " " + className + "." + methodName + parameterDescription + " args:" + Arrays.toString(args));
|
||||
}
|
||||
TraceContext traceContext = TraceContext.getTraceContext();
|
||||
GlobalCallTrace globalCallTrace = traceContext.getGlobalCallTrace();
|
||||
@@ -91,4 +92,6 @@ public class BaseOperationTransitionStateInterceptor implements StaticAfterInter
|
||||
// TODO 기본 인코딩은 뭔가? 동시성은 괜찮은건가? buffer 사이즈의 compact는 되어있는것인가.
|
||||
return new String(buffer.array());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user