Skip to content
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

Fix adding logback mdc appender in spring starter #13391

Merged
merged 5 commits into from
Mar 1, 2025

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Feb 25, 2025

Resolves #13383

@laurit laurit requested a review from a team as a code owner February 25, 2025 14:22
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Feb 25, 2025
@trask
Copy link
Member

trask commented Feb 27, 2025

cc @jeanbisutti @zeitlinger

Copy link
Member

@zeitlinger zeitlinger left a comment

Choose a reason for hiding this comment

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

I'm wondering if there is an easier solution - but I don't have a concrete idea.

@@ -132,6 +132,7 @@ testing {
implementation("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")

implementation(project(":instrumentation:logback:logback-appender-1.0:library"))
compileOnly(project(":instrumentation:logback:logback-mdc-1.0:library"))
Copy link
Member

Choose a reason for hiding this comment

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

I didn't follow how this compileOnly dep is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the scope to implementation, hopefully that is less confusing. A class from the logback-mdc-1.0:library is used in a test so it is needed to compile the test, I think it gets added to runtime dependencies because the main project depends on it and the suite depends on the main project.

@laurit laurit enabled auto-merge (squash) March 1, 2025 11:21
@laurit laurit merged commit f930598 into open-telemetry:main Mar 1, 2025
61 checks passed
chlos pushed a commit to chlos/opentelemetry-java-instrumentation that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test native This label can be applied to PRs to trigger them to run native tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opentelemetry-spring-boot-starter MDC Instrumentation for logback not injecting trace id
4 participants