-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging MDC tags stopped working in 2.5.10 #1225
Comments
Same issue here quit annoying since it stop us to use kamon above of 2.5.9 because we heavily rely on MDC for logging purpose. |
Hey @scheleaap, thank you so much for reporting this with a reproducible, it made it super easy to fix the problem! 🎉 Indeed, the regressing came with v2.5.10 where I rewrote a part of the instrumentation and it would basically just append things to the MDC if there was already something in the MDC. If the MDC was empty, Kamon wouldn't add anything to it 🤦 Fixed in #1227 and should be released pretty soon. |
@ivantopo thank you for investigating & fixing the issue so fast, that's great! Looking forward to the next release :-) |
Hello! Thanks! |
kamon-io#1227)" This reverts commit e10cba2.
After upgrading Kamon from 2.5.9 to 2.5.10, tags set in the Kamon context are no longer included in log messages.
At our company, we write log messages in JSON format and add information to the messages through the MDC through Kamon.
We use Kamon with logback-classic and logstash-logback-encoder.
Expected behavior
For example, we add the tag
application-startup-marker
to a log message when the application is starting up:The log message then looks as follows (for Kamon ≤ 2.5.9):
Actual behavior
However, when we upgrade to 2.5.10, the tag suddenly disappears:
Minimal example
I have created a minimal example here: https://github.com/scheleaap/kamon-issue. Run with
sbt run
.If you change the line
to
in
build.sbt
, you will see the tag reappears.Conclusion
This looks like a regression in Kamon 2.5.10.
When looking at the changes made for that release, I see there were changes in MDC-related code. Perhaps a bug was introduced there?
The text was updated successfully, but these errors were encountered: