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
JavaAgent throws a stacktrace when micronaut-tracing is trying to register itself, saying that GlobalOpenTelemetry.set calls are ignored:
[otel.javaagent 2023-12-22 10:32:49:465 -0300] [scheduled-executor-thread-1] WARN io.opentelemetry.api.GlobalOpenTelemetry - You are currently using the OpenTelemetry Instrumentation Java Agent; all GlobalOpenTelemetry.set calls are ignored - the agent provides the global OpenTelemetry object used by your application.
java.lang.Throwable
at io.opentelemetry.api.GlobalOpenTelemetry.set(GlobalOpenTelemetry.java:101)
at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.build(AutoConfiguredOpenTelemetrySdkBuilder.java:401)
at io.micronaut.tracing.opentelemetry.DefaultOpenTelemetryFactory.defaultOpenTelemetry(DefaultOpenTelemetryFactory.java:112)
at io.micronaut.tracing.opentelemetry.$DefaultOpenTelemetryFactory$DefaultOpenTelemetry0$Definition.instantiate(Unknown Source)
at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2307)
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2277)
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2289)
at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3056)
at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:81)
at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:2958)
at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2919)
at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2730)
at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1693)
at io.micronaut.context.AbstractBeanResolutionContext.getBean(AbstractBeanResolutionContext.java:89)
at io.micronaut.context.AbstractInitializableBeanDefinition.resolveBean(AbstractInitializableBeanDefinition.java:2165)
at io.micronaut.context.AbstractInitializableBeanDefinition.getBeanForConstructorArgument(AbstractInitializableBeanDefinition.java:1328)
...
Some spans (like HTTP request spans) work correctly for some reason. Functions annotated with @NewSpan won't work at all.
Steps To Reproduce
Run a program with these args:
VM Options: -javaagent:/tmp/opentelemetry-javaagent.jar
Environment variable: OTEL_JAVAAGENT_DEBUG=true
Expected Behavior
It works with the javaagent at the same time
Actual Behaviour
JavaAgent throws a stacktrace when micronaut-tracing is trying to register itself, saying that GlobalOpenTelemetry.set calls are ignored:
Some spans (like HTTP request spans) work correctly for some reason. Functions annotated with
@NewSpan
won't work at all.Steps To Reproduce
Run a program with these args:
VM Options:
-javaagent:/tmp/opentelemetry-javaagent.jar
Environment variable:
OTEL_JAVAAGENT_DEBUG=true
Used dependencies:
Environment Information
OS: Ubuntu 20
JVM:
Example Application
https://github.com/brenol/mn-tracing-issue-467/tree/main
Version
4.2.2
The text was updated successfully, but these errors were encountered: