-
Notifications
You must be signed in to change notification settings - Fork 879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log4j MDC attribute capture configuration #9758
Comments
I'm not opposed to this, even though I don't believe Log4j2 calls it "MDC" (either in their API or in their documentation). This could allow us to have a single config, e.g.
see also #8637 (comment) |
I'd love to have a single config setting, rather than having separate framework-specific settings. |
Interestingly, the Should we perhaps use a more generic term and rename the properties to |
I would propose to use |
Describe the bug
the log4j1 instrumentation uses
otel.instrumentation.log4j-appender.experimental.capture-mdc-attributes
, which aligns with the name of the logback/jboss logging configurationThe log4j2 instrumentation uses
otel.instrumentation.log4j-appender.experimental.capture-context-data-attributes
can log4j2 instrumentation be updated to use
.capture-mdc-attributes
, to align it with the log4j1, logback and jboss instrumentation?Steps to reproduce
n/a
Expected behavior
if I want to capture MDC attributes, I should use `otel.instrumentation.{instrumentation-name}.experimental.capture-mdc-attributes
Actual behavior
log4j2 uses '.capture-context-data-attributes'
Javaagent or library instrumentation version
1.31.0
Environment
JDK: temurin 17
OS: centos
Additional context
No response
The text was updated successfully, but these errors were encountered: