-
Notifications
You must be signed in to change notification settings - Fork 885
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
jboss-logmanager getMdcCopy() doesn't contain trace information #6111
Labels
enhancement
New feature or request
Comments
ahus1
added a commit
to ahus1/opentelemetry-java-instrumentation
that referenced
this issue
May 28, 2022
This allows, for example, in JSON logs to have the MDC to contain span and trace information.
ahus1
added a commit
to ahus1/opentelemetry-java-instrumentation
that referenced
this issue
May 28, 2022
This allows, for example, in JSON logs to have the MDC to contain span and trace information.
ahus1
added a commit
to ahus1/opentelemetry-java-instrumentation
that referenced
this issue
May 28, 2022
This allows, for example, in JSON logs to have the MDC to contain span and trace information.
ahus1
added a commit
to ahus1/opentelemetry-java-instrumentation
that referenced
this issue
May 30, 2022
This allows, for example, in JSON logs to have the MDC to contain span and trace information.
ahus1
added a commit
to ahus1/opentelemetry-java-instrumentation
that referenced
this issue
May 30, 2022
This allows, for example, in JSON logs to have the MDC to contain span and trace information.
ahus1
added a commit
to ahus1/opentelemetry-java-instrumentation
that referenced
this issue
May 30, 2022
This allows, for example, in JSON logs to have the MDC to contain span and trace information.
trask
pushed a commit
that referenced
this issue
Jun 2, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The library jboss-logmanager contains since version 1.3 a new method getMdcCopy(). This one returns a map with all MDC attributes. In order to be able to log span/trace IDs for example in a JSON log, the return value should contain the values like getMdc(attribute) already supports.
Describe the solution you'd like
Extended the instrumentation to return a map that includes those attributes if they are now already set.
Describe alternatives you've considered
It would be possible to create a custom instrumentation, still I think this would be useful for everyone else as well.
Additional context
The version 1.3 has been release in Apr 2012, almost 10 years ago, and the API is available in the current versions as well.
I'll prepare a PR shortly later today.
This would allow to log the trace/span information in my setup where a Quarkus application logs JSON.
Before that change the MDC would be empty.
Now it contains the tracing information:
The text was updated successfully, but these errors were encountered: