Merge branch 'master' into feature/plugin-feature
* master: Fix test case. Fix the component name. Relate to https://github.com/OpenSkywalking/skywalking-ui/pull/75
This commit is contained in:
commit
95bb65cd52
|
|
@ -63,7 +63,7 @@ public class ComponentsDefine {
|
|||
|
||||
public static final OfficialComponent JETTY_SERVER = new OfficialComponent(19, "JettyServer");
|
||||
|
||||
public static final OfficialComponent MEMCACHE = new OfficialComponent(20, "Memcache");
|
||||
public static final OfficialComponent MEMCACHED = new OfficialComponent(20, "Memcached");
|
||||
|
||||
public static final OfficialComponent SHARDING_JDBC = new OfficialComponent(21, "ShardingJDBC");
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ public class ComponentsDefine {
|
|||
addComponent(NUTZ_HTTP);
|
||||
addComponent(JETTY_CLIENT);
|
||||
addComponent(JETTY_SERVER);
|
||||
addComponent(MEMCACHE);
|
||||
addComponent(MEMCACHED);
|
||||
addComponent(SHARDING_JDBC);
|
||||
}
|
||||
|
||||
|
|
@ -111,4 +111,4 @@ public class ComponentsDefine {
|
|||
return components[componentId];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ public class MemcachedMethodInterceptor implements InstanceMethodsAroundIntercep
|
|||
Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable {
|
||||
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());
|
||||
span.setComponent(ComponentsDefine.MEMCACHED);
|
||||
Tags.DB_TYPE.set(span, ComponentsDefine.MEMCACHED.getName());
|
||||
SpanLayer.asDB(span);
|
||||
Tags.DB_STATEMENT.set(span, method.getName() + " " + allArguments[0]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ public class MemcachedMethodInterceptorTest {
|
|||
assertThat(span.isExit(), is(true));
|
||||
assertThat(SpanHelper.getComponentId(span), is(20));
|
||||
List<KeyValuePair> tags = SpanHelper.getTags(span);
|
||||
assertThat(tags.get(0).getValue(), is("Memcache"));
|
||||
assertThat(tags.get(0).getValue(), is("Memcached"));
|
||||
assertThat(tags.get(1).getValue(), is("set OperationKey"));
|
||||
assertThat(SpanHelper.getLayer(span), is(SpanLayer.DB));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue