From 4c92016006ff1832fe52aef775da82ea2c482b3c Mon Sep 17 00:00:00 2001 From: Emmanuel Hugonnet Date: Fri, 10 Jan 2025 08:35:05 +0100 Subject: [PATCH] Update OpenTelemetryProducer to use version Using the INSTRUMENTATION_VERSION so that the Instrumentation Scope value is the same as with the server filters Signed-off-by: Emmanuel Hugonnet --- .../implementation/cdi/OpenTelemetryProducer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/implementation/cdi/src/main/java/io/smallrye/opentelemetry/implementation/cdi/OpenTelemetryProducer.java b/implementation/cdi/src/main/java/io/smallrye/opentelemetry/implementation/cdi/OpenTelemetryProducer.java index f06ff884..4d2fb15f 100644 --- a/implementation/cdi/src/main/java/io/smallrye/opentelemetry/implementation/cdi/OpenTelemetryProducer.java +++ b/implementation/cdi/src/main/java/io/smallrye/opentelemetry/implementation/cdi/OpenTelemetryProducer.java @@ -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; @@ -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