Skip to content

otel.javaagent.logging=application causes warning log #14889

@maxxedev

Description

@maxxedev

Describe the bug

When running a spring-boot app with javaagent and otel.javaagent.logging=application system property set, then the following warning is logged:

WARN - ApplicationLoggerBridge - Multiple application logger implementations were provided. \
The javaagent will use the first bridge provided and ignore the following ones (this one).

It appears that javaagent initializes logging system, and then spring-boot re-initializes when it starts up. The second initialization triggers above warning message.

Possible (un)related is the following log:

WARN in Logger[io.opentelemetry.javaagent.instrumentation.executors.ExecutorMatchers] - \
No appenders present in context [default] for logger [io.opentelemetry.javaagent.instrumentation.executors.ExecutorMatchers].

Unlike ApplicationLoggerBridge log, ExecutorMatchers does not honor the logging config set by application.

Steps to reproduce

run a simple spring-boot app with ...
set -javaagent:opentelemetry-javaagent.jar
set -Dotel.javaagent.logging=application

Expected behavior

no warning message from javaagent

Actual behavior

warning message from javaagent

Javaagent or library instrumentation version

2.20.1

Environment

JDK:
OS:

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageNew issue that requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions