Skip to content

Conversation

@laurit
Copy link
Contributor

@laurit laurit commented Nov 8, 2024

Resolves #12540

@laurit laurit requested a review from a team as a code owner November 8, 2024 10:44
@github-actions github-actions bot requested a review from theletterf November 8, 2024 10:44
@trask
Copy link
Member

trask commented Nov 8, 2024

cc @jeanbisutti in case you have a chance to review

StackTraceElement source = sourceSupplier.get();
if (source != null) {
String fileName = source.getFileName();
if (fileName != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(optional)

Suggested change
if (fileName != null) {
// file name can be null from the StackTraceElement Javadoc
if (fileName != null) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copy-pasted from the logback instrumentation. Apparently you are the author of it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could have been better for the Logback instrumentation.

@laurit laurit force-pushed the log4j2-code-attribute branch from 110c4b5 to 3eca7a1 Compare November 9, 2024 20:33
@laurit laurit merged commit 15e611e into open-telemetry:main Nov 14, 2024
56 checks passed
@laurit laurit deleted the log4j2-code-attribute branch November 14, 2024 06:01
akats7 pushed a commit to akats7/opentelemetry-java-instrumentation that referenced this pull request Nov 21, 2024
akats7 pushed a commit to akats7/opentelemetry-java-instrumentation that referenced this pull request Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MDC attributes not captured with spring boot application using log4j.

3 participants