ApplicationInsights-Java
ApplicationInsights-Java copied to clipboard
Unable to propagate UserId via MDC
Expected behavior
When I insert the userId into the logging context via MDC, I would expect that it would be mapped correctly.
Actual behavior
UserId is only visible as custom properties.
To Reproduce
// does not work
MDC.put("enduser.id", userId)
// does work
Span.current().setAttribute("enduser.id", userId)
System information
Please provide the following information:
- SDK Version: 3.4.15
- OS type and version: Windows
- Application Server type and version (if applicable):
- Using spring-boot? Yes (3.1.2)
- Additional relevant libraries (with version, if applicable):