Closed
Description
The MDC is leaking out of the context to other threads.
I am using micronaut 1.3.4 with MdcInstrumenter.
The MDC set in one thread leaks in another thread.
See the failing test there: https://github.com/tom59/micronaut-mdc-issue/blob/master/src/test/java/mn/mdc/instrumenter/MDCTest.java
Expected Behaviour
The MDC should not leak into other requests.
Actual Behaviour
The MDC sets for one request ends up in another request.
It is going there: https://github.com/tom59/micronaut-mdc-issue/blob/master/src/main/java/mn/mdc/instrumenter/RequestIdFilter.java#L25
Environment Information
- Operating System: Mac
- Micronaut Version: 1.3.4
- JDK Version: 11
Activity