You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to access trace_id, span_id injected into MDC context in application code with DD_LOGS_INCTION option enabled. but, no value is injected into the MDC and NULL is returned.
What I didn't understand is that when I output the logs, if I use the format in logback-spring.xml that uses the trace_id, span_id keys of the MDC context, the values are present in the output logs. I already know that if I add the dd-trace-api dependency to my project and use CorrelationIdentifier, it returns trace_id, span_id. I would like to avoid adding dependencies if possible. The documentation describes the keys as being automatically injected into the MDC context, do I necessarily need to use CorrelationIdentifier to access them?
The text was updated successfully, but these errors were encountered:
sinbom
changed the title
Automatic injection is enabled, but trace_id is NULL in MDC context.
Automatic injection is enabled, but trace_id is null in MDC context.
Aug 23, 2024
I'm trying to access trace_id, span_id injected into MDC context in application code with DD_LOGS_INCTION option enabled. but, no value is injected into the MDC and NULL is returned.
What I didn't understand is that when I output the logs, if I use the format in logback-spring.xml that uses the trace_id, span_id keys of the MDC context, the values are present in the output logs. I already know that if I add the dd-trace-api dependency to my project and use CorrelationIdentifier, it returns trace_id, span_id. I would like to avoid adding dependencies if possible. The documentation describes the keys as being automatically injected into the MDC context, do I necessarily need to use CorrelationIdentifier to access them?
The text was updated successfully, but these errors were encountered: