mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-09 04:46:06 +10:00
Refactor interceptor types
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ package com.navercorp.pinpoint.bootstrap.instrument;
|
||||
*
|
||||
*/
|
||||
public interface InstrumentClassPool {
|
||||
InstrumentClass getClass(PinpointInstrument pluginContext, ClassLoader classLoader, String classInternalName, byte[] classFileBuffer) throws NotFoundInstrumentException;
|
||||
InstrumentClass getClass(Instrumentor pluginContext, ClassLoader classLoader, String classInternalName, byte[] classFileBuffer) throws NotFoundInstrumentException;
|
||||
boolean hasClass(ClassLoader classLoader, String classBinaryName);
|
||||
void appendToBootstrapClassPath(String jar);
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
* @author Jongho Moon
|
||||
*
|
||||
*/
|
||||
public interface PinpointInstrument {
|
||||
public interface Instrumentor {
|
||||
public TraceContext getTraceContext();
|
||||
|
||||
public InstrumentClass getInstrumentClass(ClassLoader classLoader, String className, byte[] classfileBuffer);
|
||||
|
||||
+2
-2
@@ -19,9 +19,9 @@ package com.navercorp.pinpoint.bootstrap.instrument.transformer;
|
||||
import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
|
||||
|
||||
public interface PinpointClassFileTransformer {
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException;
|
||||
public byte[] transform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException;
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
|
||||
/**
|
||||
* @author Jongho Moon
|
||||
@@ -30,7 +30,7 @@ public class PinpointClassFileTransformers {
|
||||
return new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addInterceptor(interceptorClassName, constructorArgs);
|
||||
return target.toBytecode();
|
||||
@@ -42,7 +42,7 @@ public class PinpointClassFileTransformers {
|
||||
return new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addField(fieldAccessorClassName);
|
||||
return target.toBytecode();
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright 2014 NAVER Corp.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.navercorp.pinpoint.bootstrap.interceptor;
|
||||
|
||||
/**
|
||||
* @author Jongho Moon
|
||||
*
|
||||
*/
|
||||
public interface AfterInterceptor extends Interceptor {
|
||||
void after(Object target, Object result, Throwable throwable, Object[] args);
|
||||
}
|
||||
+1
-4
@@ -19,9 +19,6 @@ package com.navercorp.pinpoint.bootstrap.interceptor;
|
||||
/**
|
||||
* @author emeroad
|
||||
*/
|
||||
public interface SimpleAroundInterceptor extends Interceptor {
|
||||
public interface AroundInterceptor extends BeforeInterceptor, AfterInterceptor {
|
||||
|
||||
void before(Object target, Object[] args);
|
||||
|
||||
void after(Object target, Object[] args, Object result, Throwable throwable);
|
||||
}
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ import com.navercorp.pinpoint.common.trace.ServiceType;
|
||||
* @author netspider
|
||||
* @author emeroad
|
||||
*/
|
||||
public class BasicMethodInterceptor implements SimpleAroundInterceptor {
|
||||
public class BasicMethodInterceptor implements AroundInterceptor {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(BasicMethodInterceptor.class);
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -64,7 +64,7 @@ public class BasicMethodInterceptor implements SimpleAroundInterceptor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright 2014 NAVER Corp.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.navercorp.pinpoint.bootstrap.interceptor;
|
||||
|
||||
/**
|
||||
* @author Jongho Moon
|
||||
*
|
||||
*/
|
||||
public interface BeforeInterceptor extends Interceptor {
|
||||
void before(Object target, Object[] args);
|
||||
}
|
||||
+3
-3
@@ -23,7 +23,7 @@ import java.util.logging.Logger;
|
||||
/**
|
||||
* @author emeroad
|
||||
*/
|
||||
public class LoggingInterceptor implements StaticAroundInterceptor, SimpleAroundInterceptor, Interceptor {
|
||||
public class LoggingInterceptor implements StaticAroundInterceptor, AroundInterceptor {
|
||||
|
||||
private final Logger logger;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class LoggingInterceptor implements StaticAroundInterceptor, SimpleAround
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, String className, String methodName, String parameterDescription, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, String className, String methodName, String parameterDescription, Object result, Throwable throwable, Object[] args) {
|
||||
if (logger.isLoggable(Level.FINE)) {
|
||||
logger.fine("after " + defaultString(target) + " " + className + "." + methodName + parameterDescription + " args:" + Arrays.toString(args) + " result:" + result + " Throwable:" + throwable);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class LoggingInterceptor implements StaticAroundInterceptor, SimpleAround
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (logger.isLoggable(Level.FINE)) {
|
||||
logger.fine("after " + defaultString(target) + " args:" + Arrays.toString(args) + " result:" + result + " Throwable:" + throwable);
|
||||
}
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.common.trace.ServiceType;
|
||||
|
||||
public abstract class SpanAsyncEventSimpleAroundInterceptor implements SimpleAroundInterceptor {
|
||||
public abstract class SpanAsyncEventSimpleAroundInterceptor implements AroundInterceptor {
|
||||
protected final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
protected final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -77,7 +77,7 @@ public abstract class SpanAsyncEventSimpleAroundInterceptor implements SimpleAro
|
||||
protected abstract void doInBeforeTrace(SpanEventRecorder recorder, AsyncTraceId asyncTraceId, Object target, Object[] args);
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, methodDescriptor.getClassName(), methodDescriptor.getMethodName(), "", args, result, throwable);
|
||||
}
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
* @author emeroad
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
public abstract class SpanEventSimpleAroundInterceptorForPlugin implements SimpleAroundInterceptor {
|
||||
public abstract class SpanEventSimpleAroundInterceptorForPlugin implements AroundInterceptor {
|
||||
protected final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
protected final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -73,7 +73,7 @@ public abstract class SpanEventSimpleAroundInterceptorForPlugin implements Simpl
|
||||
protected abstract void doInBeforeTrace(final SpanEventRecorder recorder, final Object target, final Object[] args);
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logAfterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
* @author emeroad
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
public abstract class SpanSimpleAroundInterceptor implements SimpleAroundInterceptor {
|
||||
public abstract class SpanSimpleAroundInterceptor implements AroundInterceptor {
|
||||
protected final PLogger logger;
|
||||
protected final boolean isDebug;
|
||||
|
||||
@@ -71,7 +71,7 @@ public abstract class SpanSimpleAroundInterceptor implements SimpleAroundInterce
|
||||
protected abstract Trace createTrace(final Object target, final Object[] args);
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,6 +23,6 @@ public interface StaticAroundInterceptor extends Interceptor {
|
||||
|
||||
void before(Object target, String className, String methodName, String parameterDescription, Object[] args);
|
||||
|
||||
void after(Object target, String className, String methodName, String parameterDescription, Object[] args, Object result, Throwable throwable);
|
||||
void after(Object target, String className, String methodName, String parameterDescription, Object result, Throwable throwable, Object[] args);
|
||||
|
||||
}
|
||||
|
||||
+18
-10
@@ -16,23 +16,27 @@
|
||||
|
||||
package com.navercorp.pinpoint.bootstrap.interceptor.group;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AfterInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.BeforeInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
|
||||
/**
|
||||
* @author emeroad
|
||||
*/
|
||||
public class GroupedSimpleAroundInterceptor implements SimpleAroundInterceptor {
|
||||
public class GroupedInterceptor implements AroundInterceptor {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
private final boolean debugEnabled = logger.isDebugEnabled();
|
||||
|
||||
private final SimpleAroundInterceptor delegate;
|
||||
private final BeforeInterceptor before;
|
||||
private final AfterInterceptor after;
|
||||
private final InterceptorGroup group;
|
||||
private final ExecutionPolicy policy;
|
||||
|
||||
public GroupedSimpleAroundInterceptor(SimpleAroundInterceptor delegate, InterceptorGroup group, ExecutionPolicy policy) {
|
||||
this.delegate = delegate;
|
||||
public GroupedInterceptor(BeforeInterceptor before, AfterInterceptor after, InterceptorGroup group, ExecutionPolicy policy) {
|
||||
this.before = before;
|
||||
this.after = after;
|
||||
this.group = group;
|
||||
this.policy = policy;
|
||||
}
|
||||
@@ -42,24 +46,28 @@ public class GroupedSimpleAroundInterceptor implements SimpleAroundInterceptor {
|
||||
InterceptorGroupInvocation transaction = group.getCurrentInvocation();
|
||||
|
||||
if (transaction.tryEnter(policy)) {
|
||||
delegate.before(target, args);
|
||||
if (before != null) {
|
||||
before.before(target, args);
|
||||
}
|
||||
} else {
|
||||
if (debugEnabled) {
|
||||
logger.debug("tryBefore() returns false: interceptorGroupTransaction: {}, executionPoint: {}. Skip interceptor {}", new Object[] {transaction, policy, delegate.getClass()} );
|
||||
logger.debug("tryBefore() returns false: interceptorGroupTransaction: {}, executionPoint: {}. Skip interceptor {}", new Object[] {transaction, policy, before == null ? null : before.getClass()} );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
InterceptorGroupInvocation transaction = group.getCurrentInvocation();
|
||||
|
||||
if (transaction.canLeave(policy)) {
|
||||
delegate.after(target, args, result, throwable);
|
||||
if (after != null) {
|
||||
after.after(target, result, throwable, args);
|
||||
}
|
||||
transaction.leave(policy);
|
||||
} else {
|
||||
if (debugEnabled) {
|
||||
logger.debug("tryAfter() returns false: interceptorGroupTransaction: {}, executionPoint: {}. Skip interceptor {}", new Object[] {transaction, policy, delegate.getClass()} );
|
||||
logger.debug("tryAfter() returns false: interceptorGroupTransaction: {}, executionPoint: {}. Skip interceptor {}", new Object[] {transaction, policy, after == null ? null : after.getClass()} );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -51,11 +51,11 @@ public class GroupedStaticAroundInterceptor implements StaticAroundInterceptor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, String className, String methodName, String parameterDescription, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, String className, String methodName, String parameterDescription, Object result, Throwable throwable, Object[] args) {
|
||||
InterceptorGroupInvocation transaction = group.getCurrentInvocation();
|
||||
|
||||
if (transaction.canLeave(policy)) {
|
||||
this.delegate.after(target, className, methodName, parameterDescription, args, result, throwable);
|
||||
this.delegate.after(target, className, methodName, parameterDescription, result, throwable, args);
|
||||
transaction.leave(policy);
|
||||
} else {
|
||||
if (debugEnabled) {
|
||||
|
||||
+2
-6
@@ -16,7 +16,7 @@
|
||||
|
||||
package com.navercorp.pinpoint.bootstrap.plugin.jdbc.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.BeforeInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -26,7 +26,7 @@ import com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor;
|
||||
* @author emeroad
|
||||
*/
|
||||
@TargetMethod(name="close")
|
||||
public class ConnectionCloseInterceptor implements SimpleAroundInterceptor {
|
||||
public class ConnectionCloseInterceptor implements BeforeInterceptor {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -39,8 +39,4 @@ public class ConnectionCloseInterceptor implements SimpleAroundInterceptor {
|
||||
// In case of close, we have to delete data even if the invocation failed.
|
||||
((DatabaseInfoAccessor)target)._$PINPOINT$_setDatabaseInfo(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public class PreparedStatementBindVariableInterceptor implements StaticAroundInt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, String className, String methodName, String parameterDescription, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, String className, String methodName, String parameterDescription, Object result, Throwable throwable, Object[] args) {
|
||||
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, className, methodName, parameterDescription, args, result, throwable);
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@ import com.navercorp.pinpoint.bootstrap.context.ParsingResult;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Targets;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
@@ -44,7 +44,7 @@ import com.navercorp.pinpoint.bootstrap.plugin.jdbc.bindvalue.BindValueUtils;
|
||||
@TargetMethod(name="executeQuery"),
|
||||
@TargetMethod(name="executeUpdate")
|
||||
})
|
||||
public class PreparedStatementExecuteQueryInterceptor implements SimpleAroundInterceptor {
|
||||
public class PreparedStatementExecuteQueryInterceptor implements AroundInterceptor {
|
||||
|
||||
private static final int DEFAULT_BIND_VALUE_LENGTH = 1024;
|
||||
|
||||
@@ -132,7 +132,7 @@ public class PreparedStatementExecuteQueryInterceptor implements SimpleAroundInt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-4
@@ -21,7 +21,7 @@ import java.sql.Connection;
|
||||
import com.navercorp.pinpoint.bootstrap.context.DatabaseInfo;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Targets;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
@@ -38,7 +38,7 @@ import com.navercorp.pinpoint.bootstrap.util.InterceptorUtils;
|
||||
@TargetMethod(name="createStatement", paramTypes={"int", "int"}),
|
||||
@TargetMethod(name="createStatement", paramTypes={"int", "int", "int"})
|
||||
})
|
||||
public class StatementCreateInterceptor implements SimpleAroundInterceptor {
|
||||
public class StatementCreateInterceptor implements AroundInterceptor {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -54,11 +54,10 @@ public class StatementCreateInterceptor implements SimpleAroundInterceptor {
|
||||
if (isDebug) {
|
||||
logger.beforeInterceptor(target, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class DefaultInterceptorRegistryAdaptorTest {
|
||||
|
||||
@Test
|
||||
public void addSimpleInterceptor() {
|
||||
SimpleAroundInterceptor mock = mock(SimpleAroundInterceptor.class);
|
||||
AroundInterceptor mock = mock(AroundInterceptor.class);
|
||||
|
||||
InterceptorRegistryAdaptor registry = new DefaultInterceptorRegistryAdaptor();
|
||||
int key = registry.addInterceptor(mock);
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class InterceptorRegistryTest {
|
||||
@Test
|
||||
public void testSimpleInterceptor() throws Exception {
|
||||
|
||||
SimpleAroundInterceptor simpleAroundInterceptor = mock(SimpleAroundInterceptor.class);
|
||||
AroundInterceptor simpleAroundInterceptor = mock(AroundInterceptor.class);
|
||||
when(registryAdaptor.getInterceptor(0)).thenReturn(simpleAroundInterceptor);
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -79,7 +79,7 @@ public class ArcusPlugin implements ProfilerPlugin, ArcusConstants {
|
||||
context.addClassFileTransformer("net.spy.memcached.ArcusClient", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = context.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
if (target.hasMethod("addOp", "java.lang.String", "net.spy.memcached.ops.Operation")) {
|
||||
@@ -109,7 +109,7 @@ public class ArcusPlugin implements ProfilerPlugin, ArcusConstants {
|
||||
context.addClassFileTransformer("net.spy.memcached.CacheManager", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = context.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addField(SERVICE_CODE_ACCESSOR);
|
||||
target.addInterceptor("com.navercorp.pinpoint.plugin.arcus.interceptor.CacheManagerConstructInterceptor");
|
||||
@@ -123,7 +123,7 @@ public class ArcusPlugin implements ProfilerPlugin, ArcusConstants {
|
||||
context.addClassFileTransformer("net.spy.memcached.protocol.BaseOperationImpl", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = context.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addField(SERVICE_CODE_ACCESSOR);
|
||||
return target.toBytecode();
|
||||
@@ -136,7 +136,7 @@ public class ArcusPlugin implements ProfilerPlugin, ArcusConstants {
|
||||
context.addClassFileTransformer("net.spy.memcached.plugin.FrontCacheGetFuture", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = context.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addField(CACHE_NAME_ACCESSOR);
|
||||
@@ -159,7 +159,7 @@ public class ArcusPlugin implements ProfilerPlugin, ArcusConstants {
|
||||
context.addClassFileTransformer("net.spy.memcached.plugin.FrontCacheMemcachedClient", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = context.getInstrumentClass(loader, className, classfileBuffer);
|
||||
boolean traceKey = config.isMemcachedKeyTrace();
|
||||
|
||||
@@ -183,7 +183,7 @@ public class ArcusPlugin implements ProfilerPlugin, ArcusConstants {
|
||||
context.addClassFileTransformer("net.spy.memcached.MemcachedClient", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = context.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
if (target.hasDeclaredMethod("addOp", new String[] { "java.lang.String", "net.spy.memcached.ops.Operation" })) {
|
||||
@@ -212,7 +212,7 @@ public class ArcusPlugin implements ProfilerPlugin, ArcusConstants {
|
||||
private static final PinpointClassFileTransformer FUTURE_TRANSFORMER = new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = context.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addField(OPERATION_ACCESSOR);
|
||||
@@ -236,7 +236,7 @@ public class ArcusPlugin implements ProfilerPlugin, ArcusConstants {
|
||||
private static final PinpointClassFileTransformer INTERNAL_FUTURE_TRANSFORMER = new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor context, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = context.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addField(ASYNC_TRACE_ID_ACCESSOR);
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@
|
||||
package com.navercorp.pinpoint.plugin.arcus.interceptor;
|
||||
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -27,7 +27,7 @@ import com.navercorp.pinpoint.plugin.arcus.ServiceCodeAccessor;
|
||||
* @author emeroad
|
||||
*/
|
||||
@TargetMethod(name="addOp", paramTypes={"java.lang.String", "net.spy.memcached.ops.Operation"})
|
||||
public class AddOpInterceptor implements SimpleAroundInterceptor {
|
||||
public class AddOpInterceptor implements AroundInterceptor {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -43,7 +43,7 @@ public class AddOpInterceptor implements SimpleAroundInterceptor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -27,7 +27,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -41,7 +41,7 @@ import com.navercorp.pinpoint.plugin.arcus.ServiceCodeAccessor;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(ArcusConstants.ARCUS_SCOPE)
|
||||
public class ApiInterceptor implements SimpleAroundInterceptor, ArcusConstants {
|
||||
public class ApiInterceptor implements AroundInterceptor, ArcusConstants {
|
||||
protected final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
protected final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -106,7 +106,7 @@ public class ApiInterceptor implements SimpleAroundInterceptor, ArcusConstants {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
package com.navercorp.pinpoint.plugin.arcus.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetConstructor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -27,7 +27,7 @@ import com.navercorp.pinpoint.plugin.arcus.ServiceCodeAccessor;
|
||||
* @author emeroad
|
||||
*/
|
||||
@TargetConstructor({"java.lang.String", "java.lang.String", "net.spy.memcached.ConnectionFactoryBuilder", "java.util.concurrent.CountDownLatch", "int", "int"})
|
||||
public class CacheManagerConstructInterceptor implements SimpleAroundInterceptor, ArcusConstants {
|
||||
public class CacheManagerConstructInterceptor implements AroundInterceptor, ArcusConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -38,7 +38,7 @@ public class CacheManagerConstructInterceptor implements SimpleAroundInterceptor
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@ package com.navercorp.pinpoint.plugin.arcus.interceptor;
|
||||
|
||||
import net.sf.ehcache.Element;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetConstructor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -28,7 +28,7 @@ import com.navercorp.pinpoint.plugin.arcus.CacheNameAccessor;
|
||||
* @author harebox
|
||||
*/
|
||||
@TargetConstructor("net.sf.ehcache.Element")
|
||||
public class FrontCacheGetFutureConstructInterceptor implements SimpleAroundInterceptor, ArcusConstants {
|
||||
public class FrontCacheGetFutureConstructInterceptor implements AroundInterceptor, ArcusConstants {
|
||||
|
||||
// TODO This should be extracted from FrontCacheMemcachedClient.
|
||||
private static final String DEFAULT_FRONTCACHE_NAME = "front";
|
||||
@@ -42,7 +42,7 @@ public class FrontCacheGetFutureConstructInterceptor implements SimpleAroundInte
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -29,7 +29,7 @@ import com.navercorp.pinpoint.plugin.arcus.CacheNameAccessor;
|
||||
* @author harebox
|
||||
*/
|
||||
@Group(ArcusConstants.ARCUS_SCOPE)
|
||||
public class FrontCacheGetFutureGetInterceptor implements SimpleAroundInterceptor, ArcusConstants {
|
||||
public class FrontCacheGetFutureGetInterceptor implements AroundInterceptor, ArcusConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -57,7 +57,7 @@ public class FrontCacheGetFutureGetInterceptor implements SimpleAroundIntercepto
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@ package com.navercorp.pinpoint.plugin.arcus.interceptor;
|
||||
|
||||
import net.spy.memcached.ops.Operation;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.arcus.ArcusConstants;
|
||||
@@ -27,7 +27,7 @@ import com.navercorp.pinpoint.plugin.arcus.OperationAccessor;
|
||||
* @author harebox
|
||||
* @author emeroad
|
||||
*/
|
||||
public class FutureSetOperationInterceptor implements SimpleAroundInterceptor, ArcusConstants {
|
||||
public class FutureSetOperationInterceptor implements AroundInterceptor, ArcusConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -42,7 +42,7 @@ public class FutureSetOperationInterceptor implements SimpleAroundInterceptor, A
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+2
-7
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
package com.navercorp.pinpoint.plugin.arcus.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.BeforeInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -27,16 +27,11 @@ import com.navercorp.pinpoint.plugin.arcus.ServiceCodeAccessor;
|
||||
* @author emeroad
|
||||
*/
|
||||
@TargetMethod(name="setCacheManager", paramTypes="net.spy.memcached.CacheManager")
|
||||
public class SetCacheManagerInterceptor implements SimpleAroundInterceptor, ArcusConstants {
|
||||
public class SetCacheManagerInterceptor implements BeforeInterceptor, ArcusConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void before(Object target, Object[] args) {
|
||||
if (isDebug) {
|
||||
|
||||
+5
-5
@@ -18,7 +18,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -46,7 +46,7 @@ public class CubridPlugin implements ProfilerPlugin, CubridConstants {
|
||||
setupContext.addClassFileTransformer("cubrid.jdbc.driver.CUBRIDConnection", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addField("com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor");
|
||||
|
||||
@@ -77,7 +77,7 @@ public class CubridPlugin implements ProfilerPlugin, CubridConstants {
|
||||
setupContext.addClassFileTransformer("cubrid.jdbc.driver.CUBRIDDriver", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP_CUBRID);
|
||||
|
||||
@@ -92,7 +92,7 @@ public class CubridPlugin implements ProfilerPlugin, CubridConstants {
|
||||
setupContext.addClassFileTransformer("cubrid.jdbc.driver.CUBRIDPreparedStatement", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addField("com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor");
|
||||
@@ -114,7 +114,7 @@ public class CubridPlugin implements ProfilerPlugin, CubridConstants {
|
||||
setupContext.addClassFileTransformer("cubrid.jdbc.driver.CUBRIDStatement", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addField("com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor");
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext;
|
||||
@@ -49,7 +49,7 @@ public class CommonsDbcpPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer("org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = pluginContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addInterceptor("com.navercorp.pinpoint.plugin.commons.dbcp.interceptor.DataSourceCloseInterceptor");
|
||||
return target.toBytecode();
|
||||
@@ -61,7 +61,7 @@ public class CommonsDbcpPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer("org.apache.commons.dbcp.BasicDataSource", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = pluginContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addInterceptor("com.navercorp.pinpoint.plugin.commons.dbcp.interceptor.DataSourceGetConnectionInterceptor");
|
||||
return target.toBytecode();
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.ClassFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -49,7 +49,7 @@ public class HttpClientPlugin implements ProfilerPlugin, HttpClientConstants {
|
||||
context.addClassFileTransformer("com.google.api.client.http.HttpRequest", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
InstrumentMethod execute = target.getDeclaredMethod("execute", new String[] {});
|
||||
@@ -67,7 +67,7 @@ public class HttpClientPlugin implements ProfilerPlugin, HttpClientConstants {
|
||||
logger.debug("Find nested class {}", target.getName());
|
||||
instrumentContext.addClassFileTransformer(loader, nestedClass.getName(), new PinpointClassFileTransformer() {
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addField(AsyncTraceIdAccessor.class.getName());
|
||||
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ import com.navercorp.pinpoint.bootstrap.async.AsyncTraceIdAccessor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.AsyncTraceId;
|
||||
import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -34,7 +34,7 @@ import com.navercorp.pinpoint.plugin.google.httpclient.HttpClientConstants;
|
||||
*
|
||||
*/
|
||||
@Group(value = HttpClientConstants.EXECUTE_ASYNC_SCOPE, executionPolicy = ExecutionPolicy.ALWAYS)
|
||||
public class HttpRequestExecuteAsyncMethodInnerClassConstructorInterceptor implements SimpleAroundInterceptor, HttpClientConstants {
|
||||
public class HttpRequestExecuteAsyncMethodInnerClassConstructorInterceptor implements AroundInterceptor, HttpClientConstants {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -77,7 +77,7 @@ public class HttpRequestExecuteAsyncMethodInnerClassConstructorInterceptor imple
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -35,7 +35,7 @@ import com.navercorp.pinpoint.plugin.google.httpclient.HttpClientConstants;
|
||||
*
|
||||
*/
|
||||
@Group(value = HttpClientConstants.EXECUTE_ASYNC_SCOPE, executionPolicy = ExecutionPolicy.ALWAYS)
|
||||
public class HttpRequestExecuteAsyncMethodInterceptor implements SimpleAroundInterceptor {
|
||||
public class HttpRequestExecuteAsyncMethodInterceptor implements AroundInterceptor {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -80,7 +80,7 @@ public class HttpRequestExecuteAsyncMethodInterceptor implements SimpleAroundInt
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
|
||||
@@ -45,7 +45,7 @@ public class GsonPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer("com.google.gson.Gson", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = pluginContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InterceptorGroup group = pluginContext.getInterceptorGroup(GSON_GROUP);
|
||||
|
||||
|
||||
+5
-5
@@ -20,7 +20,7 @@ import java.security.ProtectionDomain;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext;
|
||||
@@ -52,7 +52,7 @@ public class HttpClient3Plugin implements ProfilerPlugin, HttpClient3Constants {
|
||||
context.addClassFileTransformer("org.apache.commons.httpclient.HttpClient", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
injectHttpClientExecuteMethod(target, "org.apache.commons.httpclient.HttpMethod");
|
||||
@@ -78,7 +78,7 @@ public class HttpClient3Plugin implements ProfilerPlugin, HttpClient3Constants {
|
||||
context.addClassFileTransformer("org.apache.commons.httpclient.DefaultHttpMethodRetryHandler", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
InstrumentMethod retryMethod = target.getDeclaredMethod("retryMethod", "org.apache.commons.httpclient.HttpMethod", "java.io.IOException", "int");
|
||||
@@ -96,7 +96,7 @@ public class HttpClient3Plugin implements ProfilerPlugin, HttpClient3Constants {
|
||||
context.addClassFileTransformer("org.apache.commons.httpclient.HttpConnection", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addGetter(HostNameGetter.class.getName(), HttpClient3Constants.FIELD_HOST_NAME);
|
||||
@@ -119,7 +119,7 @@ public class HttpClient3Plugin implements ProfilerPlugin, HttpClient3Constants {
|
||||
context.addClassFileTransformer("org.apache.commons.httpclient.HttpMethodBase", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
InstrumentMethod execute = target.getDeclaredMethod("execute", "org.apache.commons.httpclient.HttpState", "org.apache.commons.httpclient.HttpConnection");
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -31,7 +31,7 @@ import com.navercorp.pinpoint.plugin.httpclient3.HttpClient3Constants;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(HttpClient3Constants.HTTP_CLIENT3_SCOPE)
|
||||
public class ExecuteInterceptor implements SimpleAroundInterceptor, HttpClient3Constants {
|
||||
public class ExecuteInterceptor implements AroundInterceptor, HttpClient3Constants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -60,7 +60,7 @@ public class ExecuteInterceptor implements SimpleAroundInterceptor, HttpClient3C
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -37,7 +37,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceId;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.AttachmentFactory;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -58,7 +58,7 @@ import com.navercorp.pinpoint.plugin.httpclient3.HttpClient3Constants;
|
||||
* @author Minwoo Jung
|
||||
*/
|
||||
@Group(value = HttpClient3Constants.HTTP_CLIENT3_METHOD_BASE_SCOPE, executionPolicy = ExecutionPolicy.ALWAYS)
|
||||
public class HttpMethodBaseExecuteMethodInterceptor implements SimpleAroundInterceptor, HttpClient3Constants {
|
||||
public class HttpMethodBaseExecuteMethodInterceptor implements AroundInterceptor, HttpClient3Constants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -174,7 +174,7 @@ public class HttpMethodBaseExecuteMethodInterceptor implements SimpleAroundInter
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ package com.navercorp.pinpoint.plugin.httpclient3.interceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -33,7 +33,7 @@ import com.navercorp.pinpoint.plugin.httpclient3.HttpClient3Constants;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(value=HttpClient3Constants.HTTP_CLIENT3_METHOD_BASE_SCOPE, executionPolicy=ExecutionPolicy.ALWAYS)
|
||||
public class HttpMethodBaseRequestAndResponseMethodInterceptor implements SimpleAroundInterceptor, HttpClient3Constants {
|
||||
public class HttpMethodBaseRequestAndResponseMethodInterceptor implements AroundInterceptor, HttpClient3Constants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -73,7 +73,7 @@ public class HttpMethodBaseRequestAndResponseMethodInterceptor implements Simple
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, methodDescriptor.getClassName(), methodDescriptor.getMethodName(), "", args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.common.trace.AnnotationKey;
|
||||
@@ -30,7 +30,7 @@ import com.navercorp.pinpoint.plugin.httpclient3.HttpClient3Constants;
|
||||
* @author Minwoo Jung
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
public class RetryMethodInterceptor implements SimpleAroundInterceptor, HttpClient3Constants {
|
||||
public class RetryMethodInterceptor implements AroundInterceptor, HttpClient3Constants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -60,7 +60,7 @@ public class RetryMethodInterceptor implements SimpleAroundInterceptor, HttpClie
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+12
-12
@@ -21,7 +21,7 @@ import com.navercorp.pinpoint.bootstrap.async.AsyncTraceIdAccessor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -70,7 +70,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.protocol.HttpRequestExecutor", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
InstrumentMethod execute = target.getDeclaredMethod("execute", "org.apache.http.HttpRequest", "org.apache.http.HttpClientConnection", "org.apache.http.protocol.HttpContext");
|
||||
@@ -97,7 +97,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.impl.client.AbstractHttpClient", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
injectHttpClientExecuteMethodWithHttpRequestInterceptor(target, false, "org.apache.http.HttpHost", "org.apache.http.HttpRequest");
|
||||
@@ -120,7 +120,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.impl.client.CloseableHttpClient", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
injectHttpClientExecuteMethodWithHttpRequestInterceptor(target, false, "org.apache.http.HttpHost", "org.apache.http.HttpRequest");
|
||||
@@ -160,7 +160,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.impl.client.DefaultHttpRequestRetryHandler", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InstrumentMethod retryRequest = target.getDeclaredMethod("retryRequest", "java.io.IOException", "int", "org.apache.http.protocol.HttpContext");
|
||||
|
||||
@@ -177,7 +177,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.impl.conn.AbstractPooledConnAdapter", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InstrumentMethod open = target.getDeclaredMethod("open", "org.apache.http.conn.routing.HttpRoute", "org.apache.http.protocol.HttpContext", "org.apache.http.params.HttpParams");
|
||||
|
||||
@@ -195,7 +195,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.impl.conn.ManagedClientConnectionImpl", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InstrumentMethod open = target.getDeclaredMethod("open", "org.apache.http.conn.routing.HttpRoute", "org.apache.http.protocol.HttpContext", "org.apache.http.params.HttpParams");
|
||||
|
||||
@@ -213,7 +213,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.impl.conn.BasicHttpClientConnectionManager", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InstrumentMethod connect = target.getDeclaredMethod("connect", "org.apache.http.HttpClientConnection", "org.apache.http.conn.routing.HttpRoute", "int", "org.apache.http.protocol.HttpContext");
|
||||
|
||||
@@ -231,7 +231,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.impl.conn.PoolingHttpClientConnectionManager", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InstrumentMethod connect = target.getDeclaredMethod("connect", "org.apache.http.HttpClientConnection", "org.apache.http.conn.routing.HttpRoute", "int", "org.apache.http.protocol.HttpContext");
|
||||
|
||||
@@ -249,7 +249,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.impl.nio.client.CloseableHttpAsyncClient", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
injectHttpAsyncClientExecuteMethodInterceptor(target, "org.apache.http.HttpHost", "org.apache.http.HttpRequest", "org.apache.http.protocol.HttpContext", "org.apache.http.concurrent.FutureCallback");
|
||||
@@ -276,7 +276,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addGetter(RequestProducerGetter.class.getName(), FIELD_REQUEST_PRODUCER);
|
||||
@@ -298,7 +298,7 @@ public class HttpClient4Plugin implements ProfilerPlugin, HttpClient4Constants {
|
||||
context.addClassFileTransformer("org.apache.http.concurrent.BasicFuture", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addField(AsyncTraceIdAccessor.class.getName());
|
||||
|
||||
+3
-3
@@ -38,7 +38,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.AttachmentFactory;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -58,7 +58,7 @@ import com.navercorp.pinpoint.plugin.httpclient4.HttpClient4Constants;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(HttpClient4Constants.HTTP_CLIENT4_SCOPE)
|
||||
public abstract class AbstractHttpClientExecuteMethodInterceptor implements SimpleAroundInterceptor, HttpClient4Constants {
|
||||
public abstract class AbstractHttpClientExecuteMethodInterceptor implements AroundInterceptor, HttpClient4Constants {
|
||||
protected final PLogger logger;
|
||||
protected final boolean isDebug;
|
||||
|
||||
@@ -121,7 +121,7 @@ public abstract class AbstractHttpClientExecuteMethodInterceptor implements Simp
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -43,7 +43,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceId;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.bootstrap.pair.NameIntValuePair;
|
||||
@@ -62,7 +62,7 @@ import com.navercorp.pinpoint.plugin.httpclient4.ResultFutureGetter;
|
||||
* @author jaehong.kim
|
||||
*
|
||||
*/
|
||||
public class DefaultClientExchangeHandlerImplStartMethodInterceptor implements SimpleAroundInterceptor, HttpClient4Constants {
|
||||
public class DefaultClientExchangeHandlerImplStartMethodInterceptor implements AroundInterceptor, HttpClient4Constants {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -185,7 +185,7 @@ public class DefaultClientExchangeHandlerImplStartMethodInterceptor implements S
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.common.trace.AnnotationKey;
|
||||
@@ -31,7 +31,7 @@ import com.navercorp.pinpoint.plugin.httpclient4.HttpClient4Constants;
|
||||
* @author Minwoo Jung
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
public class DefaultHttpRequestRetryHandlerRetryRequestMethodInterceptor implements SimpleAroundInterceptor, HttpClient4Constants {
|
||||
public class DefaultHttpRequestRetryHandlerRetryRequestMethodInterceptor implements AroundInterceptor, HttpClient4Constants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -62,7 +62,7 @@ public class DefaultHttpRequestRetryHandlerRetryRequestMethodInterceptor impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -31,7 +31,7 @@ import com.navercorp.pinpoint.plugin.httpclient4.HttpClient4Constants;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(HttpClient4Constants.HTTP_CLIENT4_SCOPE)
|
||||
public class HttpAsyncClientExecuteMethodInterceptor implements SimpleAroundInterceptor, HttpClient4Constants {
|
||||
public class HttpAsyncClientExecuteMethodInterceptor implements AroundInterceptor, HttpClient4Constants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -60,7 +60,7 @@ public class HttpAsyncClientExecuteMethodInterceptor implements SimpleAroundInte
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ package com.navercorp.pinpoint.plugin.httpclient4.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -36,7 +36,7 @@ import org.apache.http.*;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(value = HttpClient4Constants.HTTP_CLIENT4_SCOPE, executionPolicy = ExecutionPolicy.INTERNAL)
|
||||
public class HttpClientExecuteMethodInternalInterceptor implements SimpleAroundInterceptor, HttpClient4Constants {
|
||||
public class HttpClientExecuteMethodInternalInterceptor implements AroundInterceptor, HttpClient4Constants {
|
||||
|
||||
private boolean isHasCallbackParam;
|
||||
|
||||
@@ -60,7 +60,7 @@ public class HttpClientExecuteMethodInternalInterceptor implements SimpleAroundI
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, target.getClass().getName(), "", "internal", args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ package com.navercorp.pinpoint.plugin.httpclient4.interceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -32,7 +32,7 @@ import com.navercorp.pinpoint.plugin.httpclient4.HttpClient4Constants;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(value=HttpClient4Constants.HTTP_CLIENT4_SCOPE, executionPolicy=ExecutionPolicy.ALWAYS)
|
||||
public class HttpRequestExecutorDoSendRequestAndDoReceiveResponseMethodInterceptor implements SimpleAroundInterceptor, HttpClient4Constants {
|
||||
public class HttpRequestExecutorDoSendRequestAndDoReceiveResponseMethodInterceptor implements AroundInterceptor, HttpClient4Constants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -72,7 +72,7 @@ public class HttpRequestExecutorDoSendRequestAndDoReceiveResponseMethodIntercept
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, methodDescriptor.getClassName(), methodDescriptor.getMethodName(), "", args, result, throwable);
|
||||
}
|
||||
|
||||
+4
-4
@@ -40,7 +40,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceId;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.AttachmentFactory;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -62,7 +62,7 @@ import com.navercorp.pinpoint.plugin.httpclient4.HttpClient4Constants;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(value = HttpClient4Constants.HTTP_CLIENT4_SCOPE, executionPolicy = ExecutionPolicy.ALWAYS)
|
||||
public class HttpRequestExecutorExecuteMethodInterceptor implements SimpleAroundInterceptor, HttpClient4Constants {
|
||||
public class HttpRequestExecutorExecuteMethodInterceptor implements AroundInterceptor, HttpClient4Constants {
|
||||
private static final int HTTP_REQUEST_INDEX = 1;
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
@@ -189,7 +189,7 @@ public class HttpRequestExecutorExecuteMethodInterceptor implements SimpleAround
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
@@ -413,4 +413,4 @@ public class HttpRequestExecutorExecuteMethodInterceptor implements SimpleAround
|
||||
}
|
||||
return charset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilter;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -84,7 +84,7 @@ public class IBatisPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader,
|
||||
String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
|
||||
byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
|
||||
+5
-5
@@ -20,7 +20,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
@@ -57,7 +57,7 @@ public class JacksonPlugin implements ProfilerPlugin, JacksonConstants {
|
||||
context.addClassFileTransformer(clazzName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP);
|
||||
|
||||
@@ -96,7 +96,7 @@ public class JacksonPlugin implements ProfilerPlugin, JacksonConstants {
|
||||
context.addClassFileTransformer(clazzName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP);
|
||||
|
||||
@@ -143,7 +143,7 @@ public class JacksonPlugin implements ProfilerPlugin, JacksonConstants {
|
||||
context.addClassFileTransformer(clazzName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP);
|
||||
|
||||
@@ -161,7 +161,7 @@ public class JacksonPlugin implements ProfilerPlugin, JacksonConstants {
|
||||
context.addClassFileTransformer(clazzName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP);
|
||||
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.jackson.JacksonConstants;
|
||||
@@ -29,7 +29,7 @@ import com.navercorp.pinpoint.plugin.jackson.JacksonConstants;
|
||||
* @see JacksonPlugin#intercept_ObjectMapper(com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext)
|
||||
* @author Sungkook Kim
|
||||
*/
|
||||
public class ReadValueInterceptor implements SimpleAroundInterceptor, JacksonConstants {
|
||||
public class ReadValueInterceptor implements AroundInterceptor, JacksonConstants {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ReadValueInterceptor implements SimpleAroundInterceptor, JacksonCon
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.jackson.JacksonConstants;
|
||||
@@ -28,7 +28,7 @@ import com.navercorp.pinpoint.plugin.jackson.JacksonPlugin;
|
||||
* @see JacksonPlugin#intercept_ObjectMapper(com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext)
|
||||
* @author Sungkook Kim
|
||||
*/
|
||||
public class WriteValueAsBytesInterceptor implements SimpleAroundInterceptor, JacksonConstants {
|
||||
public class WriteValueAsBytesInterceptor implements AroundInterceptor, JacksonConstants {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -55,7 +55,7 @@ public class WriteValueAsBytesInterceptor implements SimpleAroundInterceptor, Ja
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.jackson.JacksonConstants;
|
||||
@@ -28,7 +28,7 @@ import com.navercorp.pinpoint.plugin.jackson.JacksonPlugin;
|
||||
* @see JacksonPlugin#intercept_ObjectMapper(com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext)
|
||||
* @author Sungkook Kim
|
||||
*/
|
||||
public class WriteValueAsStringInterceptor implements SimpleAroundInterceptor, JacksonConstants {
|
||||
public class WriteValueAsStringInterceptor implements AroundInterceptor, JacksonConstants {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -55,7 +55,7 @@ public class WriteValueAsStringInterceptor implements SimpleAroundInterceptor, J
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext;
|
||||
@@ -36,7 +36,7 @@ public class JdkHttpPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer("sun.net.www.protocol.http.HttpURLConnection", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addGetter(ConnectedGetter.class.getName(), "connected");
|
||||
|
||||
+4
-4
@@ -25,7 +25,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceId;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Targets;
|
||||
@@ -48,7 +48,7 @@ import com.navercorp.pinpoint.plugin.jdk.http.JdkHttpConstants;
|
||||
@TargetMethod(name="getInputStream"),
|
||||
@TargetMethod(name="getOutputStream")
|
||||
})
|
||||
public class HttpURLConnectionInterceptor implements SimpleAroundInterceptor, JdkHttpConstants {
|
||||
public class HttpURLConnectionInterceptor implements AroundInterceptor, JdkHttpConstants {
|
||||
private static final Object TRACE_BLOCK_BEGIN_MARKER = new Object();
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -130,7 +130,7 @@ public class HttpURLConnectionInterceptor implements SimpleAroundInterceptor, Jd
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
// do not log result
|
||||
logger.afterInterceptor(target, args);
|
||||
@@ -155,4 +155,4 @@ public class HttpURLConnectionInterceptor implements SimpleAroundInterceptor, Jd
|
||||
trace.traceBlockEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -28,7 +28,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceId;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -42,7 +42,7 @@ import com.navercorp.pinpoint.plugin.jetty.JettyConstants;
|
||||
import com.navercorp.pinpoint.plugin.jetty.JettySyncMethodDescriptor;
|
||||
|
||||
@TargetMethod(name = "handle", paramTypes = { "org.eclipse.jetty.server.HttpChannel" })
|
||||
public class ServerHandleInterceptor implements SimpleAroundInterceptor, JettyConstants {
|
||||
public class ServerHandleInterceptor implements AroundInterceptor, JettyConstants {
|
||||
|
||||
public static final JettySyncMethodDescriptor JETTY_SYNC_API_TAG = new JettySyncMethodDescriptor();
|
||||
|
||||
@@ -147,7 +147,7 @@ public class ServerHandleInterceptor implements SimpleAroundInterceptor, JettyCo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+4
-4
@@ -21,7 +21,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.BasicMethodInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -54,7 +54,7 @@ public class JsonLibPlugin implements ProfilerPlugin, JsonLibConstants {
|
||||
context.addClassFileTransformer(clazzName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class JsonLibPlugin implements ProfilerPlugin, JsonLibConstants {
|
||||
context.addClassFileTransformer(clazzName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP);
|
||||
|
||||
@@ -103,7 +103,7 @@ public class JsonLibPlugin implements ProfilerPlugin, JsonLibConstants {
|
||||
context.addClassFileTransformer(clazzName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP);
|
||||
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.json_lib.JsonLibConstants;
|
||||
@@ -29,7 +29,7 @@ import com.navercorp.pinpoint.plugin.json_lib.JsonLibConstants;
|
||||
*
|
||||
* @author Sangyoon Lee
|
||||
*/
|
||||
public class ParsingInterceptor implements SimpleAroundInterceptor {
|
||||
public class ParsingInterceptor implements AroundInterceptor {
|
||||
private final TraceContext traceContext;
|
||||
private final MethodDescriptor descriptor;
|
||||
private final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
@@ -54,7 +54,7 @@ public class ParsingInterceptor implements SimpleAroundInterceptor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.json_lib.JsonLibConstants;
|
||||
@@ -29,7 +29,7 @@ import com.navercorp.pinpoint.plugin.json_lib.JsonLibConstants;
|
||||
*
|
||||
* @author Sangyoon Lee
|
||||
*/
|
||||
public class ToStringInterceptor implements SimpleAroundInterceptor {
|
||||
public class ToStringInterceptor implements AroundInterceptor {
|
||||
private final TraceContext traceContext;
|
||||
private final MethodDescriptor descriptor;
|
||||
private final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
@@ -54,7 +54,7 @@ public class ToStringInterceptor implements SimpleAroundInterceptor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -46,7 +46,7 @@ public class JtdsPlugin implements ProfilerPlugin, JtdsConstants {
|
||||
PinpointClassFileTransformer transformer = new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addField("com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor");
|
||||
|
||||
@@ -80,7 +80,7 @@ public class JtdsPlugin implements ProfilerPlugin, JtdsConstants {
|
||||
setupContext.addClassFileTransformer("net.sourceforge.jtds.jdbc.Driver", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP_JTDS);
|
||||
|
||||
@@ -95,7 +95,7 @@ public class JtdsPlugin implements ProfilerPlugin, JtdsConstants {
|
||||
setupContext.addClassFileTransformer("net.sourceforge.jtds.jdbc.JtdsPreparedStatement", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addField("com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor");
|
||||
@@ -117,7 +117,7 @@ public class JtdsPlugin implements ProfilerPlugin, JtdsConstants {
|
||||
setupContext.addClassFileTransformer("net.sourceforge.jtds.jdbc.JtdsStatement", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addField("com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor");
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -34,7 +34,7 @@ public class Log4jPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer("org.apache.log4j.spi.LoggingEvent", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass mdcClass = pluginContext.getInstrumentClass(loader, "org.apache.log4j.MDC", null);
|
||||
|
||||
if (mdcClass == null) {
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -41,7 +41,7 @@ public class LogbackPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer("ch.qos.logback.classic.spi.LoggingEvent", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor pluginContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass mdcClass = pluginContext.getInstrumentClass(loader, "org.slf4j.MDC", null);
|
||||
|
||||
if (mdcClass == null) {
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilter;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -63,7 +63,7 @@ public class MyBatisPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer(sqlSession, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader,
|
||||
String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
|
||||
byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
|
||||
+6
-6
@@ -18,7 +18,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -50,7 +50,7 @@ public class MySqlPlugin implements ProfilerPlugin, MySqlConstants {
|
||||
PinpointClassFileTransformer transformer = new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
if (!target.isInterceptable()) {
|
||||
@@ -90,7 +90,7 @@ public class MySqlPlugin implements ProfilerPlugin, MySqlConstants {
|
||||
setupContext.addClassFileTransformer("com.mysql.jdbc.NonRegisteringDriver", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP_NAME);
|
||||
|
||||
@@ -105,7 +105,7 @@ public class MySqlPlugin implements ProfilerPlugin, MySqlConstants {
|
||||
setupContext.addClassFileTransformer("com.mysql.jdbc.PreparedStatement", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.addField("com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor");
|
||||
@@ -127,7 +127,7 @@ public class MySqlPlugin implements ProfilerPlugin, MySqlConstants {
|
||||
setupContext.addClassFileTransformer("com.mysql.jdbc.JDBC4PreparedStatement", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP_NAME);
|
||||
|
||||
@@ -143,7 +143,7 @@ public class MySqlPlugin implements ProfilerPlugin, MySqlConstants {
|
||||
PinpointClassFileTransformer transformer = new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
if (!target.isInterceptable()) {
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ import com.navercorp.pinpoint.bootstrap.context.DatabaseInfo;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetConstructor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -35,7 +35,7 @@ import com.navercorp.pinpoint.plugin.jdbc.mysql.MySqlConstants;
|
||||
* @author emeroad
|
||||
*/
|
||||
@TargetConstructor({ "java.lang.String", "int", "java.util.Properties", "java.lang.String", "java.lang.String" })
|
||||
public class MySQLConnectionCreateInterceptor implements SimpleAroundInterceptor {
|
||||
public class MySQLConnectionCreateInterceptor implements AroundInterceptor {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -47,7 +47,7 @@ public class MySQLConnectionCreateInterceptor implements SimpleAroundInterceptor
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext;
|
||||
@@ -44,7 +44,7 @@ public class NingAsyncHttpClientPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer("com.ning.http.client.AsyncHttpClient", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addInterceptor("com.navercorp.pinpoint.plugin.ning.asynchttpclient.interceptor.ExecuteRequestInterceptor");
|
||||
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceId;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.TargetMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -55,7 +55,7 @@ import com.ning.http.client.cookie.Cookie;
|
||||
*
|
||||
*/
|
||||
@TargetMethod(name="executeRequest", paramTypes= { "com.ning.http.client.Request", "com.ning.http.client.AsyncHandler" })
|
||||
public class ExecuteRequestInterceptor implements SimpleAroundInterceptor {
|
||||
public class ExecuteRequestInterceptor implements AroundInterceptor {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(ExecuteRequestInterceptor.class);
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -136,7 +136,7 @@ public class ExecuteRequestInterceptor implements SimpleAroundInterceptor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
// Do not log result
|
||||
logger.afterInterceptor(target, args);
|
||||
|
||||
@@ -53,7 +53,7 @@ public class OkHttpPlugin implements ProfilerPlugin, OkHttpConstants {
|
||||
context.addClassFileTransformer("com.squareup.okhttp.Call", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
for (InstrumentMethod method : target.getDeclaredMethods(MethodFilters.name("execute", "enqueue", "cancel"))) {
|
||||
@@ -69,7 +69,7 @@ public class OkHttpPlugin implements ProfilerPlugin, OkHttpConstants {
|
||||
context.addClassFileTransformer("com.squareup.okhttp.Dispatcher", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
for(InstrumentMethod method : target.getDeclaredMethods(MethodFilters.name("execute", "cancel"))) {
|
||||
@@ -91,7 +91,7 @@ public class OkHttpPlugin implements ProfilerPlugin, OkHttpConstants {
|
||||
context.addClassFileTransformer("com.squareup.okhttp.Call$AsyncCall", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addField(AsyncTraceIdAccessor.class.getName());
|
||||
|
||||
@@ -110,7 +110,7 @@ public class OkHttpPlugin implements ProfilerPlugin, OkHttpConstants {
|
||||
context.addClassFileTransformer("com.squareup.okhttp.internal.http.HttpEngine", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addGetter(UserRequestGetter.class.getName(), FIELD_USER_REQUEST);
|
||||
target.addGetter(UserResponseGetter.class.getName(), FIELD_USER_RESPONSE);
|
||||
@@ -144,7 +144,7 @@ public class OkHttpPlugin implements ProfilerPlugin, OkHttpConstants {
|
||||
context.addClassFileTransformer("com.squareup.okhttp.Request$Builder", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addGetter(HttpUrlGetter.class.getName(), FIELD_HTTP_URL);
|
||||
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -35,7 +35,7 @@ import com.navercorp.pinpoint.plugin.okhttp.OkHttpConstants;
|
||||
* @author jaehong.kim
|
||||
*
|
||||
*/
|
||||
public class DispatcherEnqueueMethodInterceptor implements SimpleAroundInterceptor, OkHttpConstants{
|
||||
public class DispatcherEnqueueMethodInterceptor implements AroundInterceptor, OkHttpConstants{
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -89,7 +89,7 @@ public class DispatcherEnqueueMethodInterceptor implements SimpleAroundIntercept
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@
|
||||
package com.navercorp.pinpoint.plugin.okhttp.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.context.*;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -33,7 +33,7 @@ import com.squareup.okhttp.Response;
|
||||
/**
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
public class HttpEngineReadResponseMethodInterceptor implements SimpleAroundInterceptor, OkHttpConstants {
|
||||
public class HttpEngineReadResponseMethodInterceptor implements AroundInterceptor, OkHttpConstants {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -87,7 +87,7 @@ public class HttpEngineReadResponseMethodInterceptor implements SimpleAroundInte
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@ package com.navercorp.pinpoint.plugin.okhttp.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.config.DumpType;
|
||||
import com.navercorp.pinpoint.bootstrap.context.*;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.AttachmentFactory;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -38,7 +38,7 @@ import com.squareup.okhttp.Request;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(OkHttpConstants.SEND_REQUEST_SCOPE)
|
||||
public class HttpEngineSendRequestMethodInterceptor implements SimpleAroundInterceptor, OkHttpConstants {
|
||||
public class HttpEngineSendRequestMethodInterceptor implements AroundInterceptor, OkHttpConstants {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -126,7 +126,7 @@ public class HttpEngineSendRequestMethodInterceptor implements SimpleAroundInter
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@
|
||||
package com.navercorp.pinpoint.plugin.okhttp.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.context.*;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -33,7 +33,7 @@ import com.squareup.okhttp.Request;
|
||||
* @author jaehong.kim
|
||||
*/
|
||||
@Group(value = OkHttpConstants.SEND_REQUEST_SCOPE, executionPolicy = ExecutionPolicy.INTERNAL)
|
||||
public class RequestBuilderBuildMethodInterceptor implements SimpleAroundInterceptor, OkHttpConstants {
|
||||
public class RequestBuilderBuildMethodInterceptor implements AroundInterceptor, OkHttpConstants {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -96,7 +96,7 @@ public class RequestBuilderBuildMethodInterceptor implements SimpleAroundInterce
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args);
|
||||
}
|
||||
|
||||
+5
-5
@@ -18,7 +18,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -51,7 +51,7 @@ public class OraclePlugin implements ProfilerPlugin, OracleConstants {
|
||||
setupContext.addClassFileTransformer("oracle.jdbc.driver.PhysicalConnection", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
target.addField("com.navercorp.pinpoint.bootstrap.plugin.jdbc.DatabaseInfoAccessor");
|
||||
|
||||
@@ -82,7 +82,7 @@ public class OraclePlugin implements ProfilerPlugin, OracleConstants {
|
||||
setupContext.addClassFileTransformer("oracle.jdbc.driver.OracleDriver", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
InterceptorGroup group = instrumentContext.getInterceptorGroup(GROUP_ORACLE);
|
||||
|
||||
@@ -97,7 +97,7 @@ public class OraclePlugin implements ProfilerPlugin, OracleConstants {
|
||||
PinpointClassFileTransformer transformer = new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
if (className.equals(CLASS_PREPARED_STATEMENT)) {
|
||||
if (instrumentContext.exist(loader, CLASS_PREPARED_STATEMENT_WRAPPER)) {
|
||||
return null;
|
||||
@@ -128,7 +128,7 @@ public class OraclePlugin implements ProfilerPlugin, OracleConstants {
|
||||
PinpointClassFileTransformer transformer = new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
if (className.equals(CLASS_STATEMENT)) {
|
||||
if (instrumentContext.exist(loader, CLASS_STATEMENT_WRAPPER)) {
|
||||
return null;
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -71,7 +71,7 @@ public class RedisPlugin implements ProfilerPlugin, RedisConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
if (handler != null) {
|
||||
handler.handle(target);
|
||||
@@ -122,7 +122,7 @@ public class RedisPlugin implements ProfilerPlugin, RedisConstants {
|
||||
context.addClassFileTransformer("redis.clients.jedis.Client", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
target.addField(METADATA_END_POINT);
|
||||
|
||||
@@ -145,7 +145,7 @@ public class RedisPlugin implements ProfilerPlugin, RedisConstants {
|
||||
context.addClassFileTransformer("redis.clients.jedis.Protocol", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
|
||||
for (InstrumentMethod method : target.getDeclaredMethods(MethodFilters.chain(MethodFilters.name("sendCommand", "read"), MethodFilters.modifierNot(Modifier.PRIVATE)))) {
|
||||
@@ -188,7 +188,7 @@ public class RedisPlugin implements ProfilerPlugin, RedisConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(classLoader, className, classfileBuffer);
|
||||
if (handler != null) {
|
||||
handler.handle(target);
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@ package com.navercorp.pinpoint.plugin.redis.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.redis.EndPointAccessor;
|
||||
@@ -30,7 +30,7 @@ import com.navercorp.pinpoint.plugin.redis.RedisConstants;
|
||||
* @author jaehong.kim
|
||||
*
|
||||
*/
|
||||
public class JedisClientConstructorInterceptor implements SimpleAroundInterceptor, RedisConstants {
|
||||
public class JedisClientConstructorInterceptor implements AroundInterceptor, RedisConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -86,6 +86,6 @@ public class JedisClientConstructorInterceptor implements SimpleAroundIntercepto
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -19,7 +19,7 @@ import redis.clients.jedis.Client;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.redis.EndPointAccessor;
|
||||
@@ -30,7 +30,7 @@ import com.navercorp.pinpoint.plugin.redis.RedisConstants;
|
||||
* @author jaehong.kim
|
||||
*
|
||||
*/
|
||||
public abstract class JedisClientMetadataAttchInterceptor implements SimpleAroundInterceptor, RedisConstants {
|
||||
public abstract class JedisClientMetadataAttchInterceptor implements AroundInterceptor, RedisConstants {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -82,6 +82,6 @@ public abstract class JedisClientMetadataAttchInterceptor implements SimpleAroun
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -22,7 +22,7 @@ import redis.clients.jedis.JedisShardInfo;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.redis.EndPointAccessor;
|
||||
@@ -35,7 +35,7 @@ import com.navercorp.pinpoint.plugin.redis.RedisConstants;
|
||||
* @author jaehong.kim
|
||||
*
|
||||
*/
|
||||
public class JedisConstructorInterceptor implements SimpleAroundInterceptor, RedisConstants {
|
||||
public class JedisConstructorInterceptor implements AroundInterceptor, RedisConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -99,6 +99,6 @@ public class JedisConstructorInterceptor implements SimpleAroundInterceptor, Red
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -18,7 +18,7 @@ package com.navercorp.pinpoint.plugin.redis.interceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.InterceptorGroup;
|
||||
@@ -35,7 +35,7 @@ import com.navercorp.pinpoint.plugin.redis.RedisConstants;
|
||||
*
|
||||
*/
|
||||
@Group(value = RedisConstants.REDIS_SCOPE, executionPolicy = ExecutionPolicy.INTERNAL)
|
||||
public class ProtocolSendCommandAndReadMethodInterceptor implements SimpleAroundInterceptor, RedisConstants {
|
||||
public class ProtocolSendCommandAndReadMethodInterceptor implements AroundInterceptor, RedisConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -78,7 +78,7 @@ public class ProtocolSendCommandAndReadMethodInterceptor implements SimpleAround
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, methodDescriptor.getClassName(), methodDescriptor.getMethodName(), "", args, result, throwable);
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilter;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.BasicMethodInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
@@ -46,7 +46,7 @@ public class BeanMethodTransformer implements PinpointClassFileTransformer, Spri
|
||||
* @see com.navercorp.pinpoint.bootstrap.plugin.transformer.PinpointClassFileTransformer#transform(com.navercorp.pinpoint.bootstrap.plugin.PinpointInstrument, java.lang.ClassLoader, java.lang.String, java.lang.Class, java.security.ProtectionDomain, byte[])
|
||||
*/
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Modify {}", className);
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ import java.security.ProtectionDomain;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ObjectRecipe;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
|
||||
@@ -40,7 +40,7 @@ public class SpringBeansPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer("org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
BeanMethodTransformer beanTransformer = new BeanMethodTransformer();
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@
|
||||
|
||||
package com.navercorp.pinpoint.plugin.spring.beans.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.Interceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
@@ -29,11 +29,11 @@ import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
public abstract class AbstractSpringBeanCreationInterceptor implements Interceptor {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
|
||||
private final PinpointInstrument instrumentContext;
|
||||
private final Instrumentor instrumentContext;
|
||||
private final PinpointClassFileTransformer transformer;
|
||||
private final TargetBeanFilter filter;
|
||||
|
||||
protected AbstractSpringBeanCreationInterceptor(PinpointInstrument instrumentContext, PinpointClassFileTransformer transformer, TargetBeanFilter filter) {
|
||||
protected AbstractSpringBeanCreationInterceptor(Instrumentor instrumentContext, PinpointClassFileTransformer transformer, TargetBeanFilter filter) {
|
||||
this.instrumentContext = instrumentContext;
|
||||
this.transformer = transformer;
|
||||
this.filter = filter;
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package com.navercorp.pinpoint.plugin.spring.beans.interceptor;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -31,7 +31,7 @@ import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
public class CreateBeanInstanceInterceptor extends AbstractSpringBeanCreationInterceptor {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
|
||||
public CreateBeanInstanceInterceptor(PinpointInstrument instrumentContext, PinpointClassFileTransformer transformer, TargetBeanFilter filter) {
|
||||
public CreateBeanInstanceInterceptor(Instrumentor instrumentContext, PinpointClassFileTransformer transformer, TargetBeanFilter filter) {
|
||||
super(instrumentContext, transformer, filter);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
|
||||
package com.navercorp.pinpoint.plugin.spring.beans.interceptor;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
@@ -29,7 +29,7 @@ import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
public class PostProcessorInterceptor extends AbstractSpringBeanCreationInterceptor {
|
||||
private final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
|
||||
public PostProcessorInterceptor(PinpointInstrument instrumentContext, PinpointClassFileTransformer transformer, TargetBeanFilter filter) {
|
||||
public PostProcessorInterceptor(Instrumentor instrumentContext, PinpointClassFileTransformer transformer, TargetBeanFilter filter) {
|
||||
super(instrumentContext, transformer, filter);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import java.security.ProtectionDomain;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.BasicMethodInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
|
||||
@@ -39,7 +39,7 @@ public class SpringWebMvcPlugin implements ProfilerPlugin {
|
||||
context.addClassFileTransformer("org.springframework.web.servlet.FrameworkServlet", new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
target.getDeclaredMethod("doGet", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse").addInterceptor(BasicMethodInterceptor.class.getName(), SPRING_MVC);
|
||||
|
||||
+12
-12
@@ -23,7 +23,7 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentMethod;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.MethodFilters;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.PinpointInstrument;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.Instrumentor;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.transformer.PinpointClassFileTransformer;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
|
||||
import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPluginSetupContext;
|
||||
@@ -81,7 +81,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -117,7 +117,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -140,7 +140,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -235,7 +235,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -259,7 +259,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -290,7 +290,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -352,7 +352,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -369,7 +369,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -393,7 +393,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -418,7 +418,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
@@ -471,7 +471,7 @@ public class ThriftPlugin implements ProfilerPlugin, ThriftConstants {
|
||||
context.addClassFileTransformer(targetClassName, new PinpointClassFileTransformer() {
|
||||
|
||||
@Override
|
||||
public byte[] transform(PinpointInstrument instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
public byte[] transform(Instrumentor instrumentContext, ClassLoader loader, String className, Class<?> classBeingRedefined,
|
||||
ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
|
||||
|
||||
final InstrumentClass target = instrumentContext.getInstrumentClass(loader, className, classfileBuffer);
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceId;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Name;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -59,7 +59,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.accessor.SocketFieldAccessor;
|
||||
* @see com.navercorp.pinpoint.plugin.thrift.interceptor.tprotocol.client.TProtocolWriteFieldStopInterceptor TProtocolWriteFieldStopInterceptor
|
||||
*/
|
||||
@Group(value = THRIFT_CLIENT_SCOPE, executionPolicy = ExecutionPolicy.BOUNDARY)
|
||||
public class TServiceClientSendBaseInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class TServiceClientSendBaseInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -149,7 +149,7 @@ public class TServiceClientSendBaseInterceptor implements SimpleAroundIntercepto
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -26,7 +26,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceId;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Name;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -46,7 +46,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.accessor.SocketAddressFieldAcc
|
||||
* @author HyunGil Jeong
|
||||
*/
|
||||
@Group(value = THRIFT_CLIENT_SCOPE, executionPolicy = ExecutionPolicy.BOUNDARY)
|
||||
public class TAsyncClientManagerCallInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class TAsyncClientManagerCallInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -120,7 +120,7 @@ public class TAsyncClientManagerCallInterceptor implements SimpleAroundIntercept
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+2
-2
@@ -32,8 +32,8 @@ public class TAsyncMethodCallCleanUpAndFireCallbackInterceptor extends TAsyncMet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
super.after(target, args, result, throwable);
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
super.after(target, result, throwable, args);
|
||||
|
||||
// Set a flag to end async trace block if this method completed successfully
|
||||
if (throwable != null) {
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import java.net.SocketAddress;
|
||||
|
||||
import org.apache.thrift.transport.TNonblockingTransport;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.thrift.ThriftConstants;
|
||||
@@ -30,7 +30,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.getter.TNonblockingTransportFi
|
||||
/**
|
||||
* @author HyunGil Jeong
|
||||
*/
|
||||
public class TAsyncMethodCallConstructInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class TAsyncMethodCallConstructInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -41,7 +41,7 @@ public class TAsyncMethodCallConstructInterceptor implements SimpleAroundInterce
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ public class TAsyncMethodCallDoReadingResponseBodyInterceptor extends TAsyncMeth
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
super.after(target, args, result, throwable);
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
super.after(target, result, throwable, args);
|
||||
|
||||
// End async trace block if TAsyncMethodCall.cleanUpAndFireCallback(...) call completed successfully
|
||||
// if there was an exception, TAsyncMethodCall.onError(...) will be called and the async trace block will be ended there
|
||||
|
||||
+2
-2
@@ -53,8 +53,8 @@ public class TAsyncMethodCallDoWritingRequestBodyInterceptor extends TAsyncMetho
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
super.after(target, args, result, throwable);
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
super.after(target, result, throwable, args);
|
||||
|
||||
// End async trace block if TAsyncMethodCall.cleanUpAndFireCallback(...) call completed successfully
|
||||
// if there was an exception, TAsyncMethodCall.onError(...) will be called and the async trace block will be ended there
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.common.trace.ServiceType;
|
||||
@@ -32,7 +32,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.accessor.AsyncMarkerFlagFieldA
|
||||
/**
|
||||
* @author HyunGil Jeong
|
||||
*/
|
||||
public class TAsyncMethodCallInternalMethodInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class TAsyncMethodCallInternalMethodInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
protected final PLogger logger = PLoggerFactory.getLogger(getClass());
|
||||
protected final boolean isDebug = logger.isDebugEnabled();
|
||||
|
||||
@@ -74,7 +74,7 @@ public class TAsyncMethodCallInternalMethodInterceptor implements SimpleAroundIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+2
-2
@@ -32,8 +32,8 @@ public class TAsyncMethodCallOnErrorInterceptor extends TAsyncMethodCallInternal
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
super.after(target, args, result, throwable);
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
super.after(target, result, throwable, args);
|
||||
|
||||
// End async trace block
|
||||
final Trace trace = super.traceContext.currentTraceObject();
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import static com.navercorp.pinpoint.plugin.thrift.ThriftScope.THRIFT_SERVER_SCO
|
||||
import org.apache.thrift.ProcessFunction;
|
||||
import org.apache.thrift.protocol.TProtocol;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Name;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -50,7 +50,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.accessor.ServerMarkerFlagField
|
||||
* @see com.navercorp.pinpoint.plugin.thrift.interceptor.tprotocol.server.TProtocolReadMessageEndInterceptor TProtocolReadMessageEndInterceptor
|
||||
*/
|
||||
@Group(value = THRIFT_SERVER_SCOPE, executionPolicy = ExecutionPolicy.INTERNAL)
|
||||
public class ProcessFunctionProcessInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class ProcessFunctionProcessInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -88,7 +88,7 @@ public class ProcessFunctionProcessInterceptor implements SimpleAroundIntercepto
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Name;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -78,7 +78,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.accessor.SocketFieldAccessor;
|
||||
* @see com.navercorp.pinpoint.plugin.thrift.interceptor.tprotocol.server.TProtocolReadMessageEndInterceptor TProtocolReadMessageEndInterceptor
|
||||
*/
|
||||
@Group(value = THRIFT_SERVER_SCOPE, executionPolicy = ExecutionPolicy.BOUNDARY)
|
||||
public class TBaseProcessorProcessInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class TBaseProcessorProcessInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -99,7 +99,7 @@ public class TBaseProcessorProcessInterceptor implements SimpleAroundInterceptor
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
final Trace trace = this.traceContext.currentRawTraceObject();
|
||||
if (trace == null) {
|
||||
return;
|
||||
|
||||
+3
-3
@@ -27,7 +27,7 @@ import com.navercorp.pinpoint.bootstrap.context.SpanEventRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.SpanRecorder;
|
||||
import com.navercorp.pinpoint.bootstrap.context.Trace;
|
||||
import com.navercorp.pinpoint.bootstrap.context.TraceContext;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Name;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -78,7 +78,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.accessor.ServerMarkerFlagField
|
||||
* @see com.navercorp.pinpoint.plugin.thrift.interceptor.tprotocol.server.TProtocolReadMessageEndInterceptor TProtocolReadMessageEndInterceptor
|
||||
*/
|
||||
@Group(value = THRIFT_SERVER_SCOPE, executionPolicy = ExecutionPolicy.BOUNDARY)
|
||||
public class TBaseAsyncProcessorProcessInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class TBaseAsyncProcessorProcessInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -111,7 +111,7 @@ public class TBaseAsyncProcessorProcessInterceptor implements SimpleAroundInterc
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import java.net.Socket;
|
||||
import org.apache.thrift.transport.TNonblockingTransport;
|
||||
import org.apache.thrift.transport.TTransport;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLogger;
|
||||
import com.navercorp.pinpoint.bootstrap.logging.PLoggerFactory;
|
||||
import com.navercorp.pinpoint.plugin.thrift.ThriftConstants;
|
||||
@@ -33,7 +33,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.getter.TNonblockingTransportFi
|
||||
*
|
||||
* @author HyunGil Jeong
|
||||
*/
|
||||
public abstract class FrameBufferTransportInjectInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public abstract class FrameBufferTransportInjectInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -44,7 +44,7 @@ public abstract class FrameBufferTransportInjectInterceptor implements SimpleAro
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (validate0(target, args, result)) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import static com.navercorp.pinpoint.plugin.thrift.ThriftScope.THRIFT_CLIENT_SCO
|
||||
import org.apache.thrift.TException;
|
||||
import org.apache.thrift.protocol.TProtocol;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Name;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -46,7 +46,7 @@ import com.navercorp.pinpoint.plugin.thrift.ThriftHeader;
|
||||
* @see com.navercorp.pinpoint.plugin.thrift.interceptor.client.TServiceClientSendBaseInterceptor TServiceClientSendBaseInterceptor
|
||||
*/
|
||||
@Group(value = THRIFT_CLIENT_SCOPE, executionPolicy = ExecutionPolicy.INTERNAL)
|
||||
public class TProtocolWriteFieldStopInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class TProtocolWriteFieldStopInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -73,7 +73,7 @@ public class TProtocolWriteFieldStopInterceptor implements SimpleAroundIntercept
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import static com.navercorp.pinpoint.plugin.thrift.ThriftScope.THRIFT_SERVER_SCO
|
||||
|
||||
import org.apache.thrift.protocol.TField;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Name;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -60,7 +60,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.accessor.ServerMarkerFlagField
|
||||
* @see com.navercorp.pinpoint.plugin.thrift.interceptor.tprotocol.server.TProtocolReadMessageEndInterceptor TProtocolReadMessageEndInterceptor
|
||||
*/
|
||||
@Group(value = THRIFT_SERVER_SCOPE, executionPolicy = ExecutionPolicy.INTERNAL)
|
||||
public class TProtocolReadFieldBeginInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class TProtocolReadFieldBeginInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -77,7 +77,7 @@ public class TProtocolReadFieldBeginInterceptor implements SimpleAroundIntercept
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
+3
-3
@@ -20,7 +20,7 @@ import static com.navercorp.pinpoint.plugin.thrift.ThriftScope.THRIFT_SERVER_SCO
|
||||
|
||||
import org.apache.thrift.protocol.TMessage;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.SimpleAroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.AroundInterceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Group;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.annotation.Name;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.group.ExecutionPolicy;
|
||||
@@ -48,7 +48,7 @@ import com.navercorp.pinpoint.plugin.thrift.field.accessor.AsyncMarkerFlagFieldA
|
||||
* @see com.navercorp.pinpoint.plugin.thrift.interceptor.tprotocol.server.TProtocolReadMessageEndInterceptor TProtocolReadMessageEndInterceptor
|
||||
*/
|
||||
@Group(value = THRIFT_SERVER_SCOPE, executionPolicy = ExecutionPolicy.INTERNAL)
|
||||
public class TProtocolReadMessageBeginInterceptor implements SimpleAroundInterceptor, ThriftConstants {
|
||||
public class TProtocolReadMessageBeginInterceptor implements AroundInterceptor, ThriftConstants {
|
||||
|
||||
private final PLogger logger = PLoggerFactory.getLogger(this.getClass());
|
||||
private final boolean isDebug = logger.isDebugEnabled();
|
||||
@@ -65,7 +65,7 @@ public class TProtocolReadMessageBeginInterceptor implements SimpleAroundInterce
|
||||
}
|
||||
|
||||
@Override
|
||||
public void after(Object target, Object[] args, Object result, Throwable throwable) {
|
||||
public void after(Object target, Object result, Throwable throwable, Object[] args) {
|
||||
if (isDebug) {
|
||||
logger.afterInterceptor(target, args, result, throwable);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user