How can I automatically add attributes to logs such as tracing::info!()? #1497
-
I would like to give an attribute of trace_id to the log to tie the log to the trace in New Relic.
However, this method is very cumbersome. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Logs to Trace correlation should be automatically done, if you are using the opentelemetry-tracing-appender. There is no need of explicitly pass the traceid, instead it'll be automatically correlated, as long as you have instrumented using OTel Tracing API for your traces. |
Beta Was this translation helpful? Give feedback.
Logs to Trace correlation should be automatically done, if you are using the opentelemetry-tracing-appender. There is no need of explicitly pass the traceid, instead it'll be automatically correlated, as long as you have instrumented using OTel Tracing API for your traces.