I am using log4j in my spring boot application. The issue that I am facing is that the MDC attributes are not captured even after adding otel.instrumentation.log4j-appender.experimental.capture-mdc-attributes=* . Do I need to configure anything else ?
The other settings like otel.instrumentation.log4j-appender.experimental-log-attributes work as as expected.
update: I am able to get mdc attributes if I add them
ThreadContext.put("userId", "myid");
ThreadContext.put("requestId", "reqID");
But how do I capture attributes like className / LoggerName ?