diff --git a/servicetalk-opentelemetry-http/src/main/java/io/servicetalk/opentelemetry/http/OpenTelemetryHttpRequestFilter.java b/servicetalk-opentelemetry-http/src/main/java/io/servicetalk/opentelemetry/http/OpenTelemetryHttpRequestFilter.java index 8410da520b..2adac0ce56 100755 --- a/servicetalk-opentelemetry-http/src/main/java/io/servicetalk/opentelemetry/http/OpenTelemetryHttpRequestFilter.java +++ b/servicetalk-opentelemetry-http/src/main/java/io/servicetalk/opentelemetry/http/OpenTelemetryHttpRequestFilter.java @@ -44,10 +44,10 @@ import io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientMetrics; import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractor; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesExtractor; +import io.opentelemetry.semconv.SemanticAttributes; import java.util.function.UnaryOperator; -import static io.opentelemetry.semconv.SemanticAttributes.PEER_SERVICE; /** * An HTTP filter that supports open telemetry. @@ -142,7 +142,7 @@ public OpenTelemetryHttpRequestFilter() { componentName = componentName.trim(); if (!componentName.isEmpty()) { clientInstrumenterBuilder.addAttributesExtractor( - AttributesExtractor.constant(PEER_SERVICE, componentName)); + AttributesExtractor.constant(SemanticAttributes.PEER_SERVICE, componentName)); } instrumenter = clientInstrumenterBuilder.buildClientInstrumenter(RequestHeadersPropagatorSetter.INSTANCE);