You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you mentioned, Spring Boot re-initializes the logging system. So, the way to proceed with a programmatic use of the SDK is to install OpenTelemetry in the OpenTelemetry appender after this re-initialization.
Describe the bug
I have the following setup
opentelemetry-logback-appender-1.0
SpringApplication.run
is calledSteps to reproduce
full code: demo.zip
Expected behavior
if I uncomment
OpenTelemetryAppender.install(OTEL)
, things work as expected:Actual behavior
nothing is logged
Javaagent or library instrumentation version
1.34.1
Environment
JDK: 21
OS: windows
Additional context
Spring re-creates log appenders during
SpringApplication.run
callAs a result, this new
OTelAppender
never gets configured with otel instanceI believe it's possible to apply global otel in the constructor or default to it until another instance is provided.
Otherwise, this behavior should at least be documented (ideally as a spring-boot example with proper way to config otel there).
The text was updated successfully, but these errors were encountered: