wu-sheng commented on a change in pull request #771: Add [Agent] ServiceComb 
Plugin #437
URL: 
https://github.com/apache/incubator-skywalking/pull/771#discussion_r167423037
 
 

 ##########
 File path: 
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/ProducerOperationHandlerInterceptor.java
 ##########
 @@ -48,16 +48,28 @@ public void beforeMethod(EnhancedInstance objInst, Method 
method, Object[] allAr
             next = next.next();
             next.setHeadValue(invocation.getContext().get(next.getHeadKey()));
         }
+        if (null == invocation.getOperationMeta()) {
+            return;
+        }
         String operationName = invocation.getMicroserviceQualifiedName();
         AbstractSpan span = ContextManager.createEntrySpan(operationName, 
contextCarrier);
-        String url = invocation.getOperationMeta().getOperationPath();
-        Tags.URL.set(span, url);
+        if (null != invocation.getOperationMeta() && null != 
invocation.getOperationMeta().getOperationPath()) {
+            String url = invocation.getOperationMeta().getOperationPath();
+            Tags.URL.set(span, url);
+        }
         span.setComponent(ComponentsDefine.SERVICECOMB);
         SpanLayer.asRPCFramework(span);
     }
 
     @Override public Object afterMethod(EnhancedInstance objInst, Method 
method, Object[] allArguments,
         Class<?>[] argumentsTypes, Object ret) throws Throwable {
+        Invocation invocation = (Invocation)allArguments[0];
 
 Review comment:
   And stop span can't be expected.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to