提交 e3aae025 编写于 作者: A ascrutae

fix operation name of redis span issue

上级 1f876948
......@@ -46,7 +46,7 @@ public class JedisMethodInterceptor extends NoCocurrencyAceessObject {
this.whenEnter(context, new Runnable() {
@Override
public void run() {
Span span = ContextManager.INSTANCE.createSpan(interceptorContext.methodName());
Span span = ContextManager.INSTANCE.createSpan("Jedis/" + interceptorContext.methodName());
Tags.COMPONENT.set(span, REDIS_COMPONENT);
Tags.DB_TYPE.set(span, REDIS_COMPONENT);
tagPeer(span, context);
......
......@@ -126,7 +126,7 @@ public class JedisMethodInterceptorTest {
}
private void assertRedisSpan(Span span) {
assertThat(span.getOperationName(), is("set"));
assertThat(span.getOperationName(), is("Jedis/set"));
assertThat(Tags.PEER_HOST.get(span), is("127.0.0.1"));
assertThat(Tags.PEER_PORT.get(span), is(6379));
assertThat(Tags.COMPONENT.get(span), is("Redis"));
......@@ -136,7 +136,7 @@ public class JedisMethodInterceptorTest {
}
private void assertRedisSpan(Span span, String exceptedPeerHosts){
assertThat(span.getOperationName(), is("set"));
assertThat(span.getOperationName(), is("Jedis/set"));
assertThat(Tags.PEERS.get(span), is(exceptedPeerHosts));
assertThat(Tags.COMPONENT.get(span), is("Redis"));
assertThat(Tags.DB_STATEMENT.get(span), is("set OperationKey"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册