CodePrometheus commented on code in PR #323:
URL: https://github.com/apache/skywalking-python/pull/323#discussion_r1378075327


##########
skywalking/log/sw_logging.py:
##########
@@ -75,6 +77,9 @@ def build_log_tags() -> LogTags:
 
         context = get_context()
 
+        if config.agent_log_print_tid:
+            record.tid = str(context.segment.related_traces[0])

Review Comment:
   @kezhenxu94 thanks for your comment, my opinion is:
   1) If and only if agent_log_print_tid=true, the agent will enable the 
ability to print traceId.
   2) When the user-defined layout has tid, but agent_log_print_tid=false, 
printing traceId is turned off, so I will determine whether the user's input 
already exists tid before changing the layout.
   3) Or emphasize in the document that when agent_log_print_tid=true, the 
layout will change accordingly.



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to