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
Helidon's OpenTelemetry CDI producer for tracing items (such as tracer, etc.) does not assign the Helidon global tracer soon enough.
Although injection points for the Tracer contain the correct, fully-configured tracer, an access to Tracer.global()before CDI has to produce a tracing element incorrectly returns the default (no-op) tracer.
Steps to reproduce
Add the following test to the helidon-microprofile-telemetry component:
@HelidonTest@AddConfig(key = "otel.sdk.disabled", value = "false")
classTestTracerAtStartup {
@TestvoidcheckForFullFeaturedTracerAtStartup() {
assertThat("Global tracer from start-up extension",
TestExtension.globalTracerAtStartup.unwrap(io.opentelemetry.api.trace.Tracer.class).getClass().getName(),
not(containsString("Default")));
}
}
The test fails because, although the server has completed its start-up work, CDI has not created the Helidon producer app-scoped bean and that code assigns global tracer.
The text was updated successfully, but these errors were encountered:
Environment Details
Problem Description
Helidon's OpenTelemetry CDI producer for tracing items (such as tracer, etc.) does not assign the Helidon global tracer soon enough.
Although injection points for the
Tracer
contain the correct, fully-configured tracer, an access toTracer.global()
before CDI has to produce a tracing element incorrectly returns the default (no-op) tracer.Steps to reproduce
Add the following test to the
helidon-microprofile-telemetry
component:The test fails because, although the server has completed its start-up work, CDI has not created the Helidon producer app-scoped bean and that code assigns global tracer.
The text was updated successfully, but these errors were encountered: