Closed carstenlenz closed 5 years ago
Hey @carstenlenz!
Indeed, tags should be removed as well. Otherwise, we risk mixing data from requests that don't have certain tags with the data from the last request that had those tags in a given thread. No good!
Are you up for raising a quick PR? :wink:
Yes ! :)
There are essentially two ways of doing it:
I tried doing the first one but can provide the other solution as well.
When having
kamon.instrumentation.logback.mdc.copy.tags = yes
the tags are put into the MDC will stay in the MDC forever (well... on that thread ... as long as the thread lives...)In https://github.com/kamon-io/kamon-logback/blob/a26cf66a66ff21b2bfe61693454c76ab1c94375d/src/main/scala/kamon/instrumentation/logback/LogbackInstrumentation.scala#L115-L119 only traceID spanID and configured entries get removed.
Is it ok to remove tags as well?