diff --git a/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/com/a/eye/skywalking/plugin/jedis/v2/JedisMethodInterceptor.java b/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/com/a/eye/skywalking/plugin/jedis/v2/JedisMethodInterceptor.java index 59adabd6a6d63628306d03c9bc7f9086a7a3d747..33cc50744dd0dcdfb17539e2e7b13ba3d1e22947 100644 --- a/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/com/a/eye/skywalking/plugin/jedis/v2/JedisMethodInterceptor.java +++ b/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/com/a/eye/skywalking/plugin/jedis/v2/JedisMethodInterceptor.java @@ -10,8 +10,9 @@ import com.a.eye.skywalking.trace.Span; import com.a.eye.skywalking.trace.tag.Tags; /** - * {@link JedisMethodInterceptor} create span and set redis host and redis connection information - * from {@link EnhancedClassInstanceContext#context} to span tags. + * {@link JedisMethodInterceptor} intercept all method of {@link redis.clients.jedis.Jedis} + * or {@link redis.clients.jedis.JedisCluster}. {@link JedisMethodInterceptor} record + * the redis host, operation name and the key of the operation. * * @author zhangxin */ @@ -36,9 +37,7 @@ public class JedisMethodInterceptor extends NoCocurrencyAceessObject { * using {@link #KEY_OF_REDIS_HOST} is not null. */ protected static final String KEY_OF_REDIS_PORT = "KEY_OF_REDIS_PORT"; - /** - * Redis component - */ + private static final String REDIS_COMPONENT = "Redis"; diff --git a/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/com/a/eye/skywalking/plugin/jedis/v2/define/JedisInstrumentation.java b/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/com/a/eye/skywalking/plugin/jedis/v2/define/JedisInstrumentation.java index af0401b1da186a37392de08d44d6eb0d6ec09aea..788bedc93492f1fe66fd3df2183283b2b6e496c7 100644 --- a/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/com/a/eye/skywalking/plugin/jedis/v2/define/JedisInstrumentation.java +++ b/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/src/main/java/com/a/eye/skywalking/plugin/jedis/v2/define/JedisInstrumentation.java @@ -35,6 +35,7 @@ public class JedisInstrumentation extends ClassInstanceMethodsEnhancePluginDefin private static final String CONSTRUCTOR_WITH_STRING_ARG_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.jedis.v2.JedisConstructorWithStringArgInterceptor"; private static final String CONSTRUCTOR_WITH_SHARD_INFO_ARG_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.jedis.v2.JedisConstructorWithShardInfoArgInterceptor"; private static final String CONSTRUCTOR_WITH_URI_ARG_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.jedis.v2.JedisConstructorWithUriArgInterceptor"; + private static final String JEDIS_METHOD_INTERCET_CLASS = "com.a.eye.skywalking.plugin.jedis.v2.JedisMethodInterceptor"; @Override public String enhanceClassName() { @@ -94,7 +95,7 @@ public class JedisInstrumentation extends ClassInstanceMethodsEnhancePluginDefin @Override public String getMethodsInterceptor() { - return "com.a.eye.skywalking.plugin.jedis.v2.JedisMethodInterceptor"; + return JEDIS_METHOD_INTERCET_CLASS; } }}; } diff --git a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/ConsumerFetchRequestURLInterceptor.java b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/MotanConsumerFetchRequestURLInterceptor.java similarity index 87% rename from skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/ConsumerFetchRequestURLInterceptor.java rename to skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/MotanConsumerFetchRequestURLInterceptor.java index 5a1693763f360883780d15997f844340dcaa21fe..a1d1b3a5dd09fe94dcbbd372cdde7bcc66bee01f 100644 --- a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/ConsumerFetchRequestURLInterceptor.java +++ b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/MotanConsumerFetchRequestURLInterceptor.java @@ -6,12 +6,12 @@ import com.a.eye.skywalking.api.plugin.interceptor.enhance.InstanceMethodsAround import com.a.eye.skywalking.api.plugin.interceptor.enhance.MethodInterceptResult; /** - * {@link ConsumerFetchRequestURLInterceptor} record {@link com.weibo.api.motan.rpc.URL} to {@link EnhancedClassInstanceContext#context} + * {@link MotanConsumerFetchRequestURLInterceptor} record {@link com.weibo.api.motan.rpc.URL} to {@link EnhancedClassInstanceContext#context} * for the operation name that create span need. * * @author zhangxin */ -public class ConsumerFetchRequestURLInterceptor implements InstanceMethodsAroundInterceptor { +public class MotanConsumerFetchRequestURLInterceptor implements InstanceMethodsAroundInterceptor { private static final String CONTEXT_NAME_OF_REQUEST_URL = "REQUEST_URL"; diff --git a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/ConsumerInvokeInterceptor.java b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/MotanConsumerInvokeInterceptor.java similarity index 95% rename from skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/ConsumerInvokeInterceptor.java rename to skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/MotanConsumerInvokeInterceptor.java index ce2b845fcc29cb5752f6e95232de73bed13bad47..c24b056e230fac6b188464a1b37898a6370bf9cb 100644 --- a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/ConsumerInvokeInterceptor.java +++ b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/MotanConsumerInvokeInterceptor.java @@ -13,13 +13,13 @@ import com.weibo.api.motan.rpc.Response; import com.weibo.api.motan.rpc.URL; /** - * {@link ConsumerInvokeInterceptor} create span by fetch request url from + * {@link MotanConsumerInvokeInterceptor} create span by fetch request url from * {@link EnhancedClassInstanceContext#context} and transport serialized context * data to provider side through {@link Request#setAttachment(String, String)}. * * @author zhangxin */ -public class ConsumerInvokeInterceptor implements InstanceMethodsAroundInterceptor { +public class MotanConsumerInvokeInterceptor implements InstanceMethodsAroundInterceptor { /** * Context name of request url in {@link EnhancedClassInstanceContext#context}. diff --git a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/ProviderInterceptor.java b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/MotanProviderInterceptor.java similarity index 94% rename from skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/ProviderInterceptor.java rename to skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/MotanProviderInterceptor.java index e3a7e6a424b20079f4235974b3b2cfdd99a4f2ac..bbc66f3a7c1acc8a1b990fbd09d20b5ccc11e670 100644 --- a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/ProviderInterceptor.java +++ b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/MotanProviderInterceptor.java @@ -18,12 +18,12 @@ import com.weibo.api.motan.rpc.URL; * Current trace segment will ref the trace segment from previous level if the serialized context data that fetch * from {@link Request#getAttachments()} is not null. * - * {@link ProviderInterceptor} intercept all constructor of {@link com.weibo.api.motan.rpc.AbstractProvider} for record + * {@link MotanProviderInterceptor} intercept all constructor of {@link com.weibo.api.motan.rpc.AbstractProvider} for record * the request url from consumer side. * * @author zhangxin */ -public class ProviderInterceptor implements InstanceConstructorInterceptor, InstanceMethodsAroundInterceptor { +public class MotanProviderInterceptor implements InstanceConstructorInterceptor, InstanceMethodsAroundInterceptor { /** * The diff --git a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/define/MotanConsumerInstrumentation.java b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/define/MotanConsumerInstrumentation.java index d545f4e942ccda3d3272b09d924cf58983b5307b..b2b0d248b51888d10bec062dcd6dfe1ef95284cb 100644 --- a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/define/MotanConsumerInstrumentation.java +++ b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/define/MotanConsumerInstrumentation.java @@ -3,8 +3,8 @@ package com.a.eye.skywalking.plugin.motan.define; import com.a.eye.skywalking.api.plugin.interceptor.ConstructorInterceptPoint; import com.a.eye.skywalking.api.plugin.interceptor.InstanceMethodsInterceptPoint; import com.a.eye.skywalking.api.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine; -import com.a.eye.skywalking.plugin.motan.ConsumerFetchRequestURLInterceptor; -import com.a.eye.skywalking.plugin.motan.ConsumerInvokeInterceptor; +import com.a.eye.skywalking.plugin.motan.MotanConsumerFetchRequestURLInterceptor; +import com.a.eye.skywalking.plugin.motan.MotanConsumerInvokeInterceptor; import com.weibo.api.motan.rpc.Request; import com.weibo.api.motan.rpc.URL; @@ -15,9 +15,9 @@ import static net.bytebuddy.matcher.ElementMatchers.named; /** * {@link MotanConsumerInstrumentation} presents that skywalking intercept - * {@link com.weibo.api.motan.cluster.support.ClusterSpi#call(Request)} by using {@link ConsumerInvokeInterceptor} and + * {@link com.weibo.api.motan.cluster.support.ClusterSpi#call(Request)} by using {@link MotanConsumerInvokeInterceptor} and * intercept {@link com.weibo.api.motan.cluster.support.ClusterSpi#setUrl(URL)} by using - * {@link ConsumerFetchRequestURLInterceptor} to intercept{@link ConsumerFetchRequestURLInterceptor}. + * {@link MotanConsumerFetchRequestURLInterceptor} to intercept{@link MotanConsumerFetchRequestURLInterceptor}. * * @author zhangxin */ @@ -25,9 +25,9 @@ public class MotanConsumerInstrumentation extends ClassInstanceMethodsEnhancePlu private static final String ENHANCE_CLASS = "com.weibo.api.motan.cluster.support.ClusterSpi"; - private static final String FETCH_REQUEST_URL_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.motan.ConsumerFetchRequestURLInterceptor"; + private static final String FETCH_REQUEST_URL_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.motan.MotanConsumerFetchRequestURLInterceptor"; - private static final String INVOKE_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.motan.ConsumerInvokeInterceptor"; + private static final String INVOKE_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.motan.MotanConsumerInvokeInterceptor"; @Override protected String enhanceClassName() { diff --git a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/define/MotanProviderInstrumentation.java b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/define/MotanProviderInstrumentation.java index 5e47bbb994f62e4bc33e230608176146d349a17c..34db6c28e425f28a4bce470f8f359cb2d4473d53 100644 --- a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/define/MotanProviderInstrumentation.java +++ b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/src/main/java/com/a/eye/skywalking/plugin/motan/define/MotanProviderInstrumentation.java @@ -3,6 +3,7 @@ package com.a.eye.skywalking.plugin.motan.define; import com.a.eye.skywalking.api.plugin.interceptor.ConstructorInterceptPoint; import com.a.eye.skywalking.api.plugin.interceptor.InstanceMethodsInterceptPoint; import com.a.eye.skywalking.api.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine; +import com.a.eye.skywalking.plugin.motan.MotanProviderInterceptor; import com.weibo.api.motan.rpc.Request; import net.bytebuddy.description.method.MethodDescription; @@ -13,7 +14,7 @@ import static net.bytebuddy.matcher.ElementMatchers.named; /** * {@link MotanProviderInstrumentation} presents that skywalking will use - * {@link com.a.eye.skywalking.plugin.motan.ProviderInterceptor} to intercept + * {@link MotanProviderInterceptor} to intercept * all constructor of {@link com.weibo.api.motan.rpc.AbstractProvider} and * {@link com.weibo.api.motan.rpc.AbstractProvider#call(Request)}. * @@ -28,11 +29,11 @@ public class MotanProviderInstrumentation extends ClassInstanceMethodsEnhancePlu /** * Class that intercept all constructor of ${@link com.weibo.api.motan.rpc.AbstractProvider}. */ - private static final String CONSTRUCTOR_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.motan.ProviderInterceptor"; + private static final String CONSTRUCTOR_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.motan.MotanProviderInterceptor"; /** * Class that intercept {@link com.weibo.api.motan.rpc.AbstractProvider#call(Request)}. */ - private static final String PROVIDER_INVOKE_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.motan.ProviderInterceptor"; + private static final String PROVIDER_INVOKE_INTERCEPT_CLASS = "com.a.eye.skywalking.plugin.motan.MotanProviderInterceptor"; @Override protected String enhanceClassName() {