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


##########
docs/en/setup/advanced/LogReporter.md:
##########
@@ -103,4 +103,7 @@ Will result in:
     }
   ]
 }
-```
\ No newline at end of file
+```
+
+## Print trace ID in your logs
+To print out the traceId in the logs, simply add `%(tid)s` to the 
`agent_log_reporter_layout`.

Review Comment:
   ```suggestion
   To print out the trace IDs in the logs, simply add `%(tid)s` to the 
`agent_log_reporter_layout`.
   ```



##########
skywalking/log/sw_logging.py:
##########
@@ -75,6 +75,9 @@ def build_log_tags() -> LogTags:
 
         context = get_context()
 
+        if 'tid' in layout:

Review Comment:
   Please check for the full %(tid)s instead of this, otherwise one may surpise 
you with something like **tid**ewave.



##########
CHANGELOG.md:
##########
@@ -4,6 +4,7 @@
 
 - Feature:
   - Users now can specify the `SW_AGENT_ASYNCIO_ENHANCEMENT` environment 
variable to enable the performance enhancement with asyncio (#316)
+  - Add support printing TID to logs (#323)

Review Comment:
   ```suggestion
     - Support printing Trace IDs (TID) to collected application logs (#323)
   ```



-- 
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-unsubscr...@skywalking.apache.org

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

Reply via email to