Skip to content

Commit

Permalink
Update OpenTelemetryProducer to use version
Browse files Browse the repository at this point in the history
Using the INSTRUMENTATION_VERSION so that the Instrumentation Scope value is the same as with the server filters

Signed-off-by: Emmanuel Hugonnet <[email protected]>
  • Loading branch information
ehsavoie committed Jan 10, 2025
1 parent aa60d83 commit 4c92016
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.smallrye.opentelemetry.implementation.cdi;

import static io.smallrye.opentelemetry.api.OpenTelemetryConfig.INSTRUMENTATION_NAME;
import static io.smallrye.opentelemetry.api.OpenTelemetryConfig.INSTRUMENTATION_VERSION;

import java.security.AccessController;
import java.security.PrivilegedAction;
Expand Down Expand Up @@ -103,7 +104,7 @@ public OpenTelemetry getOpenTelemetry(final OpenTelemetryConfig config) {
@Produces
@Singleton
public Tracer getTracer() {
return CDI.current().select(OpenTelemetry.class).get().getTracer(INSTRUMENTATION_NAME);
return CDI.current().select(OpenTelemetry.class).get().getTracer(INSTRUMENTATION_NAME, INSTRUMENTATION_VERSION);
}

@Produces
Expand Down

0 comments on commit 4c92016

Please sign in to comment.