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 2020/12/18 16:39:02 UTC

[GitHub] [skywalking] dmsolr commented on a change in pull request #5989: Fix thrift trace broken and wrong arg collected.

dmsolr commented on a change in pull request #5989:
URL: https://github.com/apache/skywalking/pull/5989#discussion_r545951747



##########
File path: apm-sniffer/apm-sdk-plugin/thrift-plugin/src/main/java/org/apache/skywalking/apm/plugin/thrift/wrapper/ServerInProtocolWrapper.java
##########
@@ -45,6 +45,7 @@
     private static final ILog LOGGER = LogManager.getLogger(ServerInProtocolWrapper.class);
     private static final StringTag TAG_ARGS = new StringTag("args");
     private AbstractContext context;
+    private static ThreadLocal<Boolean> HAVE_CREATED = ThreadLocal.withInitial(() -> Boolean.FALSE);

Review comment:
       SkyWalking provides a safe `RuntimeContext` which is alive during a tracing. So we prefer to use this rather than directly ThreadLocal. 
   More details see `ContextManager#getRuntimeContext()`, please.




----------------------------------------------------------------
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.

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