Modify operationName to invocation.getInvocationQualifiedName

This commit is contained in:
lytscu 2018-01-26 10:07:16 +08:00
parent 7ccdcbcdfe
commit 5e8bc0090e
5 changed files with 5 additions and 5 deletions

View File

@ -58,7 +58,7 @@ public class InvocationInterceptor implements InstanceMethodsAroundInterceptor {
next = next.next();
next.setHeadValue(invocation.getContext().get(next.getHeadKey()));
}
String operationName = invocation.getOperationName();
String operationName = invocation.getInvocationQualifiedName();
span = ContextManager.createEntrySpan(operationName, contextCarrier);
String url = invocation.getOperationMeta().getOperationPath();
Tags.URL.set(span, url);

View File

@ -66,7 +66,7 @@ public class NextInterceptor implements InstanceMethodsAroundInterceptor {
URI uri = new URI(invocation.getEndpoint().toString());
String peer = uri.getHost() + ":" + uri.getPort();
final ContextCarrier contextCarrier = new ContextCarrier();
span = ContextManager.createExitSpan(invocation.getOperationName(), contextCarrier, peer);
span = ContextManager.createExitSpan(invocation.getInvocationQualifiedName(), contextCarrier, peer);
CarrierItem next = contextCarrier.items();
while (next.hasNext()) {
next = next.next();

View File

@ -1 +1 @@
servicecomb-0.6=org.apache.skywalking.apm.plugin.servicecomb.define.InvocationInstrumentation
servicecomb-0.x=org.apache.skywalking.apm.plugin.servicecomb.define.InvocationInstrumentation

View File

@ -98,7 +98,7 @@ public class InvocationInterceptorTest {
when(operationMeta.getSchemaMeta()).thenReturn(schemaMeta);
when(endpoint.getAddress()).thenReturn("0.0.0.0:7777");
when(enhancedInstance.getEndpoint()).thenReturn(endpoint);
when(enhancedInstance.getOperationName()).thenReturn("productorTest");
when(enhancedInstance.getInvocationQualifiedName()).thenReturn("productorTest");
when(operationMeta.getOperationPath()).thenReturn("/bmi");
when(enhancedInstance.getOperationMeta()).thenReturn(operationMeta);
when(enhancedInstance.getStatus()).thenReturn(statusType);

View File

@ -99,7 +99,7 @@ public class NextInterceptorTest {
when(operationMeta.getSchemaMeta()).thenReturn(schemaMeta);
when(endpoint.getAddress()).thenReturn("0.0.0.0:7777");
when(enhancedInstance.getEndpoint()).thenReturn(endpoint);
when(enhancedInstance.getOperationName()).thenReturn("consumerTest");
when(enhancedInstance.getInvocationQualifiedName()).thenReturn("consumerTest");
when(operationMeta.getOperationPath()).thenReturn("/bmi");
when(enhancedInstance.getOperationMeta()).thenReturn(operationMeta);
when(enhancedInstance.getStatus()).thenReturn(statusType);