Provide auto-configurations for OpenTelemetry Logs #40961
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces auto-configuration for
SdkLoggerProvider
andOtlpHttpLogRecordExporter
(closes #37355). The implementation basically follows the approach used for Tracing, excluding gRPC.Instrumentation settings via logback or log4j are out of the scope of this PR because the library is still in alpha version.
There was a consideration to place the package under the existing
org.springframework.boot.actuate.autoconfigure.opentelemetry
ororg.springframework.boot.actuate.autoconfigure.logging
. However, a new packageorg.springframework.boot.actuate.autoconfigure.logs
has been created for this auto-configuration. This may need to be changed.With this auto-configuration, users can configure the Logback Appender to send logs via OLTP as follows:
Additionally, to ensure the functionality of this pull request, an experimental project was created and tested, which also includes auto-configuration for the Logback Appender:
https://github.com/making/otel-logs-autoconfigure