mdc does not showed up anymore when using logback.getMDCPropertyMap() #14971
Unanswered
bomanarakasura-unipin
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
If you want someone to take a look then provide a minimal application that illustrates your issue along with any necessary instructions. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I was using old Otel Instrumentation v2.2.0-alpha.
Current problem
I have a custom Logger using Logback and this is a plain Java object that is not required to be registered using Bean or Configuration. You guys can just copy this code.
Above code prints mdc to console like this :
{ "timestamp" : "2025-10-13 13:47:23+0700", "level" : "INFO", "thread" : "http-nio-8083-exec-1", "mdc" : { "traceId" : "888bde93c8985d18ff07f1a981c6b8e1", "spanId" : "f9de7067761f5a80" },Take a look on that mdc object.
But after I updated the version to Otel Instrumentation 2.20.1 and Otel 1.54.1, mdc map does not showed up anymore.
How to reproduce
apiwithimplementation:Then, try to run your spring application, you will see mdc object on your log.
However, if you update the opentelemetry bom, the mdc object disappeared from your console log.
Beta Was this translation helpful? Give feedback.
All reactions