zhaoyuguang commented on a change in pull request #2750: Logback support 
AsyncAppender print tid
URL: https://github.com/apache/skywalking/pull/2750#discussion_r287344242
 
 

 ##########
 File path: 
apm-sniffer/apm-toolkit-activation/apm-toolkit-logback-1.x-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/log/logback/v1/x/PrintTraceIdInterceptor.java
 ##########
 @@ -37,7 +38,11 @@
 
     @Override public Object afterMethod(EnhancedInstance objInst, Method 
method, Object[] allArguments,
         Class<?>[] argumentsTypes, Object ret) throws Throwable {
-        return "TID:" + ContextManager.getGlobalTraceId();
+        String tid = ContextManager.getGlobalTraceId();
+        if ("N/A".equals(tid)) {
+            tid = (String) ((EnhancedInstance) 
allArguments[0]).getSkyWalkingDynamicField();
+        }
 
 Review comment:
   OK

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to