ApplicationInsights-Java icon indicating copy to clipboard operation
ApplicationInsights-Java copied to clipboard

Unable to propagate UserId via MDC

Open MatthiasMpo opened this issue 10 months ago • 4 comments

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):

image

MatthiasMpo avatar Aug 17 '23 10:08 MatthiasMpo