aabmass commented on PR #2498:
URL: https://github.com/apache/logging-log4j2/pull/2498#issuecomment-2070784374

   Thanks for the quick review!
   
   > A quick question just before merging it: If `trace_id` and/or `span_id` 
MDC values are missing, `logging.googleapis.com/trace_sampled` will still be 
set to `true` without `logging.googleapis.com/trace` and/or 
`logging.googleapis.com/spanId` fields. Will this still be okay?
   
   It should be OK and doesn't have any effect in the Cloud Console if the IDs 
aren't present–the trace icon won't appear regardless without the IDs. Here is 
how the three fields correspond to the UI:
   
![image](https://github.com/apache/logging-log4j2/assets/1510004/0d4c9c6e-e91c-4a58-ae98-8306e7ff52e2)
   
   If you click on the trace icon (highlighted in the image, only visible if 
the IDs are present), it opens a dropdown and the `trace_sampled` flag controls 
whether this button is greyed out or not:
   
   | `trace_sampled = true` | `trace_sampled = false` |
   |--------|--------|
   | 
![image](https://github.com/apache/logging-log4j2/assets/1510004/08c86a8a-7495-483a-ae78-8554d957a993)
 | 
![image](https://github.com/apache/logging-log4j2/assets/1510004/e12cadba-9960-410b-a564-1b3cf399588d)
 |
   
   I think setting `trace_sampled = true` might cause some confusion 
(especially if querying by that field) but it keeps the "View trace details" 
from being greyed out


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