-
I see that the auto-instrumentation supports injecting info on the current span into the logging implementation's MDC: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/logger-mdc-instrumentation.md. I am wondering if it is possible to accomplish something similar when using the API directly in our code. Ideally when a span is made current we would inject this same info into the MDC, and clear the MDC when it is no longer relevant. Is there some sort of hook we could use to do this? |
Beta Was this translation helpful? Give feedback.
Answered by
trask
Feb 9, 2021
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mrathbun1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi @mrathbun1! I think these may be what you're looking for:
https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/logback/logback-1.0/library
https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/log4j/log4j-2.13.2/library