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

Allow the Spring starter to configure the OTel Logback appender from system properties #10355

Merged

Conversation

jeanbisutti
Copy link
Member

@jeanbisutti jeanbisutti commented Jan 30, 2024

With #10306, the OTel Logback appender is added by the OTel starter if the appender is not declared in a Logback XML file.

With this PR it becomes possible the configure the OpenTelemetry Logback appender with system properties from the Spring starter, as the OpenTelemetry Java agent is able to do.

@jeanbisutti jeanbisutti requested a review from a team as a code owner January 30, 2024 16:34
@jeanbisutti
Copy link
Member Author

If an attribute is configured both in the Logback XML file and with a system property, the system property overrides the configuration.

@@ -0,0 +1,44 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

will this file conflict with the one we're autogenerating?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. See https://docs.spring.io/spring-boot/docs/current/reference/html/configuration-metadata.html#appendix.configuration-metadata.annotation-processor.adding-additional-metadata: "the annotation processor automatically merges items from META-INF/additional-spring-configuration-metadata.json into the main metadata file."

@trask trask enabled auto-merge (squash) February 2, 2024 17:11
@trask trask merged commit 80e5bac into open-telemetry:main Feb 2, 2024
47 checks passed
steverao pushed a commit to steverao/opentelemetry-java-instrumentation that referenced this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants