diff --git a/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/pom.xml b/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/pom.xml index c05d2a584..784547130 100644 --- a/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/pom.xml +++ b/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/pom.xml @@ -1,35 +1,35 @@ - 4.0.0 - - org.skywalking - apm-sdk-plugin - 3.2.2-2017 - - - apm-spymemcached-2.x-plugin - spymemcached-2.x-plugin - http://maven.apache.org + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + 4.0.0 + + org.skywalking + apm-sdk-plugin + 3.2.3-2017 + - - UTF-8 - 2.11.1 - + apm-spymemcached-2.x-plugin + spymemcached-2.x-plugin + http://maven.apache.org - - - net.spy - spymemcached - ${spymemcached.version} - provided - - - org.apache.logging.log4j - log4j-core - 2.4.1 - test - - - + + UTF-8 + 2.11.1 + + + + + net.spy + spymemcached + ${spymemcached.version} + provided + + + org.apache.logging.log4j + log4j-core + 2.4.1 + test + + + \ No newline at end of file diff --git a/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java index f760919bf..89a864dab 100644 --- a/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java @@ -18,15 +18,12 @@ public class MemcachedMethodInterceptor implements InstanceMethodsAroundIntercep @Override public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws Throwable { - Object[] arguments = allArguments; String peer = String.valueOf(objInst.getSkyWalkingDynamicField()); AbstractSpan span = ContextManager.createExitSpan(SPY_MEMCACHE + method.getName(), peer); span.setComponent(ComponentsDefine.MEMCACHE); Tags.DB_TYPE.set(span, ComponentsDefine.MEMCACHE.getName()); SpanLayer.asDB(span); - if (allArguments.length > 0 && arguments[0] instanceof String) { - Tags.DB_STATEMENT.set(span, method.getName() + " " + arguments[0]); - } + Tags.DB_STATEMENT.set(span, method.getName() + " " + allArguments[0]); } @Override diff --git a/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/skywalking/apm/plugin/spymemcached/v2/define/MemcachedInstrumentation.java b/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/skywalking/apm/plugin/spymemcached/v2/define/MemcachedInstrumentation.java index f9b1706cf..bbb18baab 100644 --- a/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/skywalking/apm/plugin/spymemcached/v2/define/MemcachedInstrumentation.java +++ b/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/skywalking/apm/plugin/spymemcached/v2/define/MemcachedInstrumentation.java @@ -22,7 +22,7 @@ import static net.bytebuddy.matcher.ElementMatchers.takesArgument; * {@link XMemcachedConstructorWithInetSocketAddressListArgInterceptor} intercepts the constructor with * argument {@link java.net.InetSocketAddress}. * - *@author IluckySi + * @author IluckySi * */ public class MemcachedInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {