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 2021/03/17 12:49:31 UTC

[GitHub] [skywalking] EvanLjp commented on a change in pull request #6567: fix no trace id in async log

EvanLjp commented on a change in pull request #6567:
URL: https://github.com/apache/skywalking/pull/6567#discussion_r595983742



##########
File path: apm-sniffer/apm-toolkit-activation/apm-toolkit-log4j-2.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/log4j/v2/x/async/AsyncAppenderMethodInterceptor.java
##########
@@ -32,7 +32,9 @@ public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allAr
         MethodInterceptResult result) throws Throwable {
         if (allArguments[0] instanceof EnhancedInstance) {
             EnhancedInstance instances = (EnhancedInstance) allArguments[0];
-            instances.setSkyWalkingDynamicField(ContextManager.getGlobalTraceId());
+            if (instances.getSkyWalkingDynamicField() == null){
+                instances.setSkyWalkingDynamicField(ContextManager.getGlobalTraceId());

Review comment:
       I have the same problem as Sheng? @xuanyu66 




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