diff --git a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/EnhanceClazz4Interceptor.java b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/EnhanceClazz4Interceptor.java index ce00118df..01f77c835 100644 --- a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/EnhanceClazz4Interceptor.java +++ b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/EnhanceClazz4Interceptor.java @@ -1,9 +1,10 @@ package com.ai.cloud.skywalking.plugin.interceptor; -import com.ai.cloud.skywalking.plugin.PluginCfg; -import com.ai.cloud.skywalking.util.StringUtil; +import static net.bytebuddy.matcher.ElementMatchers.any; + +import java.util.List; + import net.bytebuddy.ByteBuddy; -import net.bytebuddy.description.method.MethodDescription; import net.bytebuddy.dynamic.ClassFileLocator; import net.bytebuddy.dynamic.DynamicType; import net.bytebuddy.dynamic.loading.ClassLoadingStrategy; @@ -13,12 +14,12 @@ import net.bytebuddy.implementation.SuperMethodCall; import net.bytebuddy.implementation.bind.annotation.FieldProxy; import net.bytebuddy.pool.TypePool; import net.bytebuddy.pool.TypePool.Resolution; + import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.util.List; - -import static net.bytebuddy.matcher.ElementMatchers.any; +import com.ai.cloud.skywalking.plugin.PluginCfg; +import com.ai.cloud.skywalking.util.StringUtil; public class EnhanceClazz4Interceptor { private static Logger logger = LogManager @@ -115,15 +116,15 @@ public class EnhanceClazz4Interceptor { FieldGetter.class, FieldSetter.class)))); - MethodNameMatcher[] methodNameList = define.getBeInterceptedMethods(); + MethodNameMatcher[] methodMatchers = define.getBeInterceptedMethodsMatchers(); ClassMethodInterceptor classMethodInterceptor = new ClassMethodInterceptor( interceptor); - for (MethodNameMatcher method : methodNameList) { + for (MethodNameMatcher methodMatcher : methodMatchers) { logger.debug("prepare to enhance class {} method [{}] ", - enhanceOriginClassName, method.getMethodMatchDescribe()); + enhanceOriginClassName, methodMatcher.getMethodMatchDescribe()); newClassBuilder = newClassBuilder.method( - method.builderMatcher()).intercept( + methodMatcher.builderMatcher()).intercept( MethodDelegation.to(classMethodInterceptor)); } diff --git a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/InterceptPoint.java b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/InterceptPoint.java deleted file mode 100644 index eec8b9363..000000000 --- a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/InterceptPoint.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.ai.cloud.skywalking.plugin.interceptor; - - -public class InterceptPoint { - private String methodName; - - private int argNum = -1; - - private Class[] argTypeArray; - - public InterceptPoint(String methodName) { - super(); - this.methodName = methodName; - } - - public InterceptPoint(String methodName, int argNum) { - this(methodName); - this.argNum = argNum; - } - - public InterceptPoint(String methodName, Class... args) { - this(methodName); - this.argTypeArray = args; - } - - public String getMethodName() { - return methodName; - } - - public int getArgNum() { - return argNum; - } - - public Class[] getArgTypeArray() { - return argTypeArray; - } - - public void setArgNum(int argNum) { - this.argNum = argNum; - } - - public void setArgTypeList(Class... args){ - argTypeArray = args; - } -} diff --git a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/InterceptorDefine.java b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/InterceptorDefine.java index 69e5d6fab..e6dcdd1cd 100644 --- a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/InterceptorDefine.java +++ b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/InterceptorDefine.java @@ -13,7 +13,7 @@ public interface InterceptorDefine { * * @return */ - public MethodNameMatcher[] getBeInterceptedMethods(); + public MethodNameMatcher[] getBeInterceptedMethodsMatchers(); /** * 返回增强拦截器的实现
diff --git a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/MethodNameMatcher.java b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/MethodNameMatcher.java index 42bd86e6c..759f3e958 100644 --- a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/MethodNameMatcher.java +++ b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/MethodNameMatcher.java @@ -1,8 +1,9 @@ package com.ai.cloud.skywalking.plugin.interceptor; +import net.bytebuddy.description.method.MethodDescription; import net.bytebuddy.matcher.ElementMatcher; -public abstract class MethodNameMatcher { +public abstract class MethodNameMatcher { private String methodMatchDescribe; @@ -24,7 +25,7 @@ public abstract class MethodNameMatcher { this.methodMatchDescribe = methodMatchDescribe; } - public abstract ElementMatcher builderMatcher(); + public abstract ElementMatcher builderMatcher(); protected String getMethodMatchDescribe() { return methodMatchDescribe; diff --git a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/AnyMethodMatcher.java b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/AnyMethodMatcher.java index 741125c47..682a5b12a 100644 --- a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/AnyMethodMatcher.java +++ b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/AnyMethodMatcher.java @@ -1,9 +1,10 @@ package com.ai.cloud.skywalking.plugin.interceptor.matcher; -import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; +import static net.bytebuddy.matcher.ElementMatchers.any; +import net.bytebuddy.description.method.MethodDescription; import net.bytebuddy.matcher.ElementMatcher; -import static net.bytebuddy.matcher.ElementMatchers.any; +import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; public class AnyMethodMatcher extends MethodNameMatcher { @@ -12,7 +13,7 @@ public class AnyMethodMatcher extends MethodNameMatcher { } @Override - public ElementMatcher builderMatcher() { + public ElementMatcher builderMatcher() { return any(); } } diff --git a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/ExclusionNameMatcher.java b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/ExclusionNameMatcher.java index 487fa4a06..476df8340 100644 --- a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/ExclusionNameMatcher.java +++ b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/ExclusionNameMatcher.java @@ -1,9 +1,12 @@ package com.ai.cloud.skywalking.plugin.interceptor.matcher; -import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; +import static net.bytebuddy.matcher.ElementMatchers.named; +import static net.bytebuddy.matcher.ElementMatchers.not; +import static net.bytebuddy.matcher.ElementMatchers.takesArguments; +import net.bytebuddy.description.method.MethodDescription; import net.bytebuddy.matcher.ElementMatcher; -import static net.bytebuddy.matcher.ElementMatchers.*; +import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; public class ExclusionNameMatcher extends MethodNameMatcher { @@ -15,13 +18,13 @@ public class ExclusionNameMatcher extends MethodNameMatcher { super(methodMatchDescribe, argNum); } - public ExclusionNameMatcher(String methodMatchDescribe, Class[] argTypeArray) { + public ExclusionNameMatcher(String methodMatchDescribe, Class[] argTypeArray) { super(methodMatchDescribe, argTypeArray); } @Override - public ElementMatcher builderMatcher() { - ElementMatcher.Junction matcher = not(named(getMethodMatchDescribe())); + public ElementMatcher builderMatcher() { + ElementMatcher.Junction matcher = not(named(getMethodMatchDescribe())); if (getArgTypeArray() != null) { matcher.and(takesArguments(getArgTypeArray())); diff --git a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/FullNameMatcher.java b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/FullNameMatcher.java index 80324b474..76aca82e8 100644 --- a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/FullNameMatcher.java +++ b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/FullNameMatcher.java @@ -1,10 +1,11 @@ package com.ai.cloud.skywalking.plugin.interceptor.matcher; -import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; -import net.bytebuddy.matcher.ElementMatcher; - import static net.bytebuddy.matcher.ElementMatchers.named; import static net.bytebuddy.matcher.ElementMatchers.takesArguments; +import net.bytebuddy.description.method.MethodDescription; +import net.bytebuddy.matcher.ElementMatcher; + +import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; public class FullNameMatcher extends MethodNameMatcher { @@ -21,8 +22,8 @@ public class FullNameMatcher extends MethodNameMatcher { } @Override - public ElementMatcher builderMatcher() { - ElementMatcher.Junction matcher = named(getMethodMatchDescribe()); + public ElementMatcher builderMatcher() { + ElementMatcher.Junction matcher = named(getMethodMatchDescribe()); if (getArgTypeArray() != null) { matcher.and(takesArguments(getArgTypeArray())); diff --git a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/RegexNameMatcher.java b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/RegexNameMatcher.java index 1cba7b2ad..5723be32e 100644 --- a/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/RegexNameMatcher.java +++ b/skywalking-api/src/main/java/com/ai/cloud/skywalking/plugin/interceptor/matcher/RegexNameMatcher.java @@ -1,10 +1,11 @@ package com.ai.cloud.skywalking.plugin.interceptor.matcher; -import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; -import net.bytebuddy.matcher.ElementMatcher; - import static net.bytebuddy.matcher.ElementMatchers.nameMatches; import static net.bytebuddy.matcher.ElementMatchers.takesArguments; +import net.bytebuddy.description.method.MethodDescription; +import net.bytebuddy.matcher.ElementMatcher; + +import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; public class RegexNameMatcher extends MethodNameMatcher { @@ -16,13 +17,13 @@ public class RegexNameMatcher extends MethodNameMatcher { super(methodMatchDescribe, argNum); } - public RegexNameMatcher(String methodMatchDescribe, Class[] argTypeArray) { + public RegexNameMatcher(String methodMatchDescribe, Class[] argTypeArray) { super(methodMatchDescribe, argTypeArray); } @Override - public ElementMatcher builderMatcher() { - ElementMatcher.Junction matcher = nameMatches(getMethodMatchDescribe()); + public ElementMatcher builderMatcher() { + ElementMatcher.Junction matcher = nameMatches(getMethodMatchDescribe()); if (getArgTypeArray() != null) { matcher.and(takesArguments(getArgTypeArray())); diff --git a/skywalking-api/src/main/java/com/ai/cloud/skywalking/sender/DataSender.java b/skywalking-api/src/main/java/com/ai/cloud/skywalking/sender/DataSender.java index a65d61b11..e265bdd77 100644 --- a/skywalking-api/src/main/java/com/ai/cloud/skywalking/sender/DataSender.java +++ b/skywalking-api/src/main/java/com/ai/cloud/skywalking/sender/DataSender.java @@ -1,6 +1,5 @@ package com.ai.cloud.skywalking.sender; -import com.ai.cloud.skywalking.util.ProtocolPackager; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; @@ -19,10 +18,10 @@ import io.netty.handler.codec.bytes.ByteArrayEncoder; import java.io.IOException; import java.net.InetSocketAddress; -import java.util.Arrays; import com.ai.cloud.skywalking.selfexamination.HeathReading; import com.ai.cloud.skywalking.selfexamination.SDKHealthCollector; +import com.ai.cloud.skywalking.util.ProtocolPackager; public class DataSender implements IDataSender { private EventLoopGroup group; diff --git a/skywalking-api/src/test/java/test/ai/cloud/plugin/TestInterceptorDefine.java b/skywalking-api/src/test/java/test/ai/cloud/plugin/TestInterceptorDefine.java index 97f71e731..bdfaf0305 100644 --- a/skywalking-api/src/test/java/test/ai/cloud/plugin/TestInterceptorDefine.java +++ b/skywalking-api/src/test/java/test/ai/cloud/plugin/TestInterceptorDefine.java @@ -1,7 +1,6 @@ package test.ai.cloud.plugin; import com.ai.cloud.skywalking.plugin.interceptor.IAroundInterceptor; -import com.ai.cloud.skywalking.plugin.interceptor.InterceptPoint; import com.ai.cloud.skywalking.plugin.interceptor.InterceptorDefine; import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; import com.ai.cloud.skywalking.plugin.interceptor.matcher.FullNameMatcher; @@ -14,7 +13,7 @@ public class TestInterceptorDefine implements InterceptorDefine { } @Override - public MethodNameMatcher[] getBeInterceptedMethods() { + public MethodNameMatcher[] getBeInterceptedMethodsMatchers() { return new MethodNameMatcher[] { new FullNameMatcher("printabc") }; } diff --git a/skywalking-sdk-plugin/httpClient-4.x-plugin-dubbox-rest-attachment/src/main/java/org/skywalking/httpClient/v4/plugin/dubbox/rest/attachment/DubboxRestHeadSetterAttachment.java b/skywalking-sdk-plugin/httpClient-4.x-plugin-dubbox-rest-attachment/src/main/java/org/skywalking/httpClient/v4/plugin/dubbox/rest/attachment/DubboxRestHeadSetterAttachment.java index c0d71738d..48881e5fa 100644 --- a/skywalking-sdk-plugin/httpClient-4.x-plugin-dubbox-rest-attachment/src/main/java/org/skywalking/httpClient/v4/plugin/dubbox/rest/attachment/DubboxRestHeadSetterAttachment.java +++ b/skywalking-sdk-plugin/httpClient-4.x-plugin-dubbox-rest-attachment/src/main/java/org/skywalking/httpClient/v4/plugin/dubbox/rest/attachment/DubboxRestHeadSetterAttachment.java @@ -1,11 +1,10 @@ package org.skywalking.httpClient.v4.plugin.dubbox.rest.attachment; -import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; import org.skywalking.httpClient.v4.plugin.HttpClientExecuteInterceptor; import com.ai.cloud.skywalking.plugin.interceptor.IAroundInterceptor; -import com.ai.cloud.skywalking.plugin.interceptor.InterceptPoint; import com.ai.cloud.skywalking.plugin.interceptor.InterceptorDefine; +import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; public class DubboxRestHeadSetterAttachment implements InterceptorDefine { @@ -21,7 +20,7 @@ public class DubboxRestHeadSetterAttachment implements InterceptorDefine { } @Override - public MethodNameMatcher[] getBeInterceptedMethods() { + public MethodNameMatcher[] getBeInterceptedMethodsMatchers() { return null; } diff --git a/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/AbstractHttpClientPluginDefine.java b/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/AbstractHttpClientPluginDefine.java index f9c09b1da..5e393eeb6 100644 --- a/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/AbstractHttpClientPluginDefine.java +++ b/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/AbstractHttpClientPluginDefine.java @@ -1,6 +1,5 @@ package org.skywalking.httpClient.v4.plugin.define; -import com.ai.cloud.skywalking.plugin.interceptor.InterceptPoint; import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; import com.ai.cloud.skywalking.plugin.interceptor.matcher.FullNameMatcher; @@ -18,7 +17,7 @@ public class AbstractHttpClientPluginDefine extends HttpClientPluginDefine { * */ @Override - public MethodNameMatcher[] getBeInterceptedMethods() { + public MethodNameMatcher[] getBeInterceptedMethodsMatchers() { return new MethodNameMatcher[] { new FullNameMatcher("doExecute")}; } diff --git a/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/DefaultRequestDirectorPluginDefine.java b/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/DefaultRequestDirectorPluginDefine.java index 953383cd2..75e32dfc2 100644 --- a/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/DefaultRequestDirectorPluginDefine.java +++ b/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/DefaultRequestDirectorPluginDefine.java @@ -1,6 +1,5 @@ package org.skywalking.httpClient.v4.plugin.define; -import com.ai.cloud.skywalking.plugin.interceptor.InterceptPoint; import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; import com.ai.cloud.skywalking.plugin.interceptor.matcher.FullNameMatcher; @@ -16,7 +15,7 @@ public class DefaultRequestDirectorPluginDefine extends HttpClientPluginDefine { } @Override - public MethodNameMatcher[] getBeInterceptedMethods() { + public MethodNameMatcher[] getBeInterceptedMethodsMatchers() { return new MethodNameMatcher[] { new FullNameMatcher("execute")}; } diff --git a/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/InternalHttpClientPluginDefine.java b/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/InternalHttpClientPluginDefine.java index 5b296e962..990c8f946 100644 --- a/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/InternalHttpClientPluginDefine.java +++ b/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/InternalHttpClientPluginDefine.java @@ -5,7 +5,7 @@ import com.ai.cloud.skywalking.plugin.interceptor.matcher.FullNameMatcher; public class InternalHttpClientPluginDefine extends HttpClientPluginDefine { @Override - public MethodNameMatcher[] getBeInterceptedMethods() { + public MethodNameMatcher[] getBeInterceptedMethodsMatchers() { return new MethodNameMatcher[]{new FullNameMatcher("doExecute")}; } diff --git a/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/MinimalHttpClientPluginDefine.java b/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/MinimalHttpClientPluginDefine.java index 1b91130ab..a0aa7750c 100644 --- a/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/MinimalHttpClientPluginDefine.java +++ b/skywalking-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/skywalking/httpClient/v4/plugin/define/MinimalHttpClientPluginDefine.java @@ -5,7 +5,7 @@ import com.ai.cloud.skywalking.plugin.interceptor.matcher.FullNameMatcher; public class MinimalHttpClientPluginDefine extends HttpClientPluginDefine { @Override - public MethodNameMatcher[] getBeInterceptedMethods() { + public MethodNameMatcher[] getBeInterceptedMethodsMatchers() { return new MethodNameMatcher[]{new FullNameMatcher("doExecute")}; } diff --git a/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/org/skywalking/jedis/v2/plugin/define/JedisPluginDefine.java b/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/org/skywalking/jedis/v2/plugin/define/JedisPluginDefine.java index 821d3331e..430444b69 100644 --- a/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/org/skywalking/jedis/v2/plugin/define/JedisPluginDefine.java +++ b/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/org/skywalking/jedis/v2/plugin/define/JedisPluginDefine.java @@ -1,29 +1,27 @@ package org.skywalking.jedis.v2.plugin.define; +import org.skywalking.jedis.v2.plugin.JedisInterceptor; + import com.ai.cloud.skywalking.plugin.interceptor.IAroundInterceptor; -import com.ai.cloud.skywalking.plugin.interceptor.InterceptPoint; import com.ai.cloud.skywalking.plugin.interceptor.InterceptorDefine; import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; -import com.ai.cloud.skywalking.plugin.interceptor.matcher.ExclusionNameMatcher; -import org.skywalking.jedis.v2.plugin.JedisInterceptor; +import com.ai.cloud.skywalking.plugin.interceptor.matcher.AnyMethodMatcher; public class JedisPluginDefine implements InterceptorDefine { - @Override - public String getBeInterceptedClassName() { - return "redis.clients.jedis.Jedis"; - } + @Override + public String getBeInterceptedClassName() { + return "redis.clients.jedis.Jedis"; + } - @Override - public MethodNameMatcher[] getBeInterceptedMethods() { - return new MethodNameMatcher[]{ - new ExclusionNameMatcher("set"), - }; - } + @Override + public MethodNameMatcher[] getBeInterceptedMethodsMatchers() { + return new MethodNameMatcher[] { new AnyMethodMatcher() }; + } - @Override - public IAroundInterceptor instance() { - return new JedisInterceptor(); - } + @Override + public IAroundInterceptor instance() { + return new JedisInterceptor(); + } } diff --git a/skywalking-sdk-plugin/mysql-plugin/src/main/java/com/ai/cloud/skywalking/plugin/mysql/ConnectionPluginDefine.java b/skywalking-sdk-plugin/mysql-plugin/src/main/java/com/ai/cloud/skywalking/plugin/mysql/ConnectionPluginDefine.java index 12cc2a36f..5137681bb 100644 --- a/skywalking-sdk-plugin/mysql-plugin/src/main/java/com/ai/cloud/skywalking/plugin/mysql/ConnectionPluginDefine.java +++ b/skywalking-sdk-plugin/mysql-plugin/src/main/java/com/ai/cloud/skywalking/plugin/mysql/ConnectionPluginDefine.java @@ -1,7 +1,6 @@ package com.ai.cloud.skywalking.plugin.mysql; import com.ai.cloud.skywalking.plugin.interceptor.IAroundInterceptor; -import com.ai.cloud.skywalking.plugin.interceptor.InterceptPoint; import com.ai.cloud.skywalking.plugin.interceptor.InterceptorDefine; import com.ai.cloud.skywalking.plugin.interceptor.MethodNameMatcher; import com.ai.cloud.skywalking.plugin.interceptor.matcher.FullNameMatcher; @@ -14,7 +13,7 @@ public class ConnectionPluginDefine implements InterceptorDefine { } @Override - public MethodNameMatcher[] getBeInterceptedMethods() { + public MethodNameMatcher[] getBeInterceptedMethodsMatchers() { return new MethodNameMatcher[] { new FullNameMatcher("createStatement", 2), new FullNameMatcher("prepareStatement", 3), new FullNameMatcher("prepareCall", 3),