You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/04/06 12:40:05 UTC

[GitHub] [skywalking-java] Cool-Coding commented on a diff in pull request #140: Fix Grpc 1.x plugin's tracing problem (#8820)

Cool-Coding commented on code in PR #140:
URL: https://github.com/apache/skywalking-java/pull/140#discussion_r843900288


##########
apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCallListener.java:
##########
@@ -76,15 +76,19 @@ public void onCancel() {
         final AbstractSpan span = ContextManager.createLocalSpan(operationPrefix + REQUEST_ON_CANCEL_OPERATION_NAME);
         span.setComponent(ComponentsDefine.GRPC);
         span.setLayer(SpanLayer.RPC_FRAMEWORK);
-        ContextManager.continued(contextSnapshot);
+        if (contextSnapshot != null) {

Review Comment:
   > If no contextSnapshot to continue, are we still reasonable to create a local span? I think this would be a no-parent span.
   
   Prehaps you are right. the entry span is created in `onReady` method. if `onReady` method is not executed, the `onCancel`  should directly return. I will prove it. please wait a moment.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org