only enhance child not all parent method (#2737)

This commit is contained in:
li.can 2019-05-23 17:08:31 +08:00 committed by 吴晟 Wu Sheng
parent 3e2fb7880d
commit beb807df81
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ package org.apache.skywalking.apm.toolkit.activation.trace;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.DeclaredInstanceMethodsInterceptPoint;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
@ -47,7 +48,7 @@ public class TraceAnnotationActivation extends ClassInstanceMethodsEnhancePlugin
@Override protected InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
return new InstanceMethodsInterceptPoint[] {
new InstanceMethodsInterceptPoint() {
new DeclaredInstanceMethodsInterceptPoint() {
@Override public ElementMatcher<MethodDescription> getMethodsMatcher() {
return isAnnotatedWith(named(TRACE_ANNOTATION));
}