Open PawelKGalka opened 6 months ago
Hi @PawelKGalka,
Can you try doing logging.googleapis.com/traceSampled
(instead of trace_sampled
) and see if that works?
hi @braydonk No luck with above, I was referring to Google documentation on structured logging: https://cloud.google.com/logging/docs/structured-logging
We were facing similar issue with logging.googleapis.com/spanId
field in same manner but I got resolved I think with some release of ops agent so potentially this needs similar development. Also we are unable to send it as boolean in jsonPayload to map so would it work if we use map_values mapping?
map_values:
"true" : true
"false": false
Hi @PawelKGalka, just to learn a bit more about your use case, would it be acceptable if the Ops Agent were to set traceSampled
automatically based on whether there's a spanId
and trace
present?
We've had a few other folks ask for ability to set traceSampled
manually as well, and it seems like all use cases so far would benefit from something automatic instead so that you don't need to configure anything.
Hi @jefferbrecht,
Our application is utilizing tracing in 3 modes based on particular criterias - DROP,RECORD,RECORD_AND_SAMPLE (from OTEL lib). This means there are cases where we trace to correlate transaction in the logs but we do not sample it to Cloud Trace. So for our use case it would be best to have this configurable in the config. Or it can take precedence over default setting when spanId/traceId is set
This issue was marked stale due to lack of activity. It will be closed in 14 days.
Describe the bug When trying to set
jsonPayload."logging.googleapis.com/trace_sampled"
it is not displayed as mapped in Logs Explorer and remains in jsonPayloadTo Reproduce Steps to reproduce the behavior:
and restart the agent
traceSampled
property and it remains in jsonPayload asjsonPayload."logging.googleapis.com/trace_sampled": "false"
Expected behavior Value mapped in logs explorer
Environment (please complete the following information):
Additional context NA