diff --git a/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetClientAttributesGetter.java b/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetClientAttributesGetter.java index d52643c51f01..d0df3bd95605 100644 --- a/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetClientAttributesGetter.java +++ b/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetClientAttributesGetter.java @@ -18,7 +18,9 @@ public interface NetClientAttributesGetter { @Nullable - String getTransport(REQUEST request, @Nullable RESPONSE response); + default String getTransport(REQUEST request, @Nullable RESPONSE response) { + return null; + } /** * Returns the application protocol used. diff --git a/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetServerAttributesGetter.java b/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetServerAttributesGetter.java index 3e34e48ac30d..b6b99cc70b00 100644 --- a/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetServerAttributesGetter.java +++ b/instrumentation-api-semconv/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/net/NetServerAttributesGetter.java @@ -18,7 +18,9 @@ public interface NetServerAttributesGetter { @Nullable - String getTransport(REQUEST request); + default String getTransport(REQUEST request) { + return null; + } /** * Returns the application protocol used. diff --git a/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpClientAttributesExtractorTest.java b/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpClientAttributesExtractorTest.java index eb4959bacf2f..dfb984365568 100644 --- a/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpClientAttributesExtractorTest.java +++ b/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpClientAttributesExtractorTest.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.api.instrumenter.http; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; @@ -72,13 +71,6 @@ public List getResponseHeader( static class TestNetClientAttributesGetter implements NetClientAttributesGetter, Map> { - @Nullable - @Override - public String getTransport( - Map request, @Nullable Map response) { - return response == null ? null : response.get("transport"); - } - @Nullable @Override public String getProtocolName( @@ -124,7 +116,6 @@ void normal() { response.put("statusCode", "202"); response.put("header.content-length", "20"); response.put("header.custom-response-header", "654,321"); - response.put("transport", IP_TCP); ToIntFunction resendCountFromContext = context -> 2; @@ -160,7 +151,6 @@ void normal() { entry( AttributeKey.stringArrayKey("http.response.header.custom_response_header"), asList("654", "321")), - entry(SemanticAttributes.NET_TRANSPORT, IP_TCP), entry(NetAttributes.NET_PROTOCOL_NAME, "http"), entry(NetAttributes.NET_PROTOCOL_VERSION, "1.1")); } diff --git a/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpServerAttributesExtractorTest.java b/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpServerAttributesExtractorTest.java index 7ac016c5a607..2703ce9a9bbf 100644 --- a/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpServerAttributesExtractorTest.java +++ b/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/http/HttpServerAttributesExtractorTest.java @@ -81,11 +81,6 @@ public List getResponseHeader( static class TestNetServerAttributesGetter implements NetServerAttributesGetter> { - @Nullable - @Override - public String getTransport(Map request) { - return (String) request.get("transport"); - } @Nullable @Override diff --git a/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/net/InetSocketAddressNetClientAttributesGetterTest.java b/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/net/InetSocketAddressNetClientAttributesGetterTest.java index fc33b6d5e969..7eac409ad9c3 100644 --- a/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/net/InetSocketAddressNetClientAttributesGetterTest.java +++ b/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/net/InetSocketAddressNetClientAttributesGetterTest.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.api.instrumenter.net; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; -import static org.assertj.core.api.Assertions.entry; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; @@ -25,10 +24,6 @@ class InetSocketAddressNetClientAttributesGetterTest { private final InetSocketAddressNetClientAttributesGetter getter = new InetSocketAddressNetClientAttributesGetter() { - @Override - public String getTransport(InetSocketAddress request, InetSocketAddress response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } @Override public String getPeerName(InetSocketAddress request) { @@ -56,9 +51,7 @@ void noInetSocketAddress() { AttributesBuilder attributes = Attributes.builder(); extractor.onEnd(attributes, Context.root(), null, null, null); - assertThat(attributes.build()) - .containsOnly( - entry(SemanticAttributes.NET_TRANSPORT, SemanticAttributes.NetTransportValues.IP_TCP)); + assertThat(attributes.build()).isEmpty(); } @Test @@ -82,7 +75,6 @@ void fullAddress() { assertThat(startAttributes.build()).isEmpty(); AttributesBuilder builder = Attributes.builder(); - builder.put(SemanticAttributes.NET_TRANSPORT, SemanticAttributes.NetTransportValues.IP_TCP); builder.put(SemanticAttributes.NET_SOCK_PEER_ADDR, address.getAddress().getHostAddress()); if (!ipv4) { builder.put(SemanticAttributes.NET_SOCK_FAMILY, "inet6"); @@ -111,8 +103,6 @@ void unresolved() { // then assertThat(startAttributes.build()).isEmpty(); - assertThat(endAttributes.build()) - .containsOnly( - entry(SemanticAttributes.NET_TRANSPORT, SemanticAttributes.NetTransportValues.IP_TCP)); + assertThat(endAttributes.build()).isEmpty(); } } diff --git a/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/net/InetSocketAddressNetServerAttributesGetterTest.java b/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/net/InetSocketAddressNetServerAttributesGetterTest.java index 13dd7c9fe8a1..3c27eba08e53 100644 --- a/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/net/InetSocketAddressNetServerAttributesGetterTest.java +++ b/instrumentation-api-semconv/src/test/java/io/opentelemetry/instrumentation/api/instrumenter/net/InetSocketAddressNetServerAttributesGetterTest.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.api.instrumenter.net; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; -import static org.assertj.core.api.Assertions.entry; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; @@ -25,11 +24,6 @@ class InetSocketAddressNetServerAttributesGetterTest { final InetSocketAddressNetServerAttributesGetter getter = new InetSocketAddressNetServerAttributesGetter() { - @Override - public String getTransport(Addresses request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getHostName(Addresses request) { // net.host.name and net.host.port are tested in NetClientAttributesExtractorTest @@ -59,9 +53,7 @@ protected InetSocketAddress getHostSocketAddress(Addresses request) { void noInetSocketAddress() { AttributesBuilder attributes = Attributes.builder(); extractor.onStart(attributes, Context.root(), new Addresses(null, null)); - assertThat(attributes.build()) - .containsOnly( - entry(SemanticAttributes.NET_TRANSPORT, SemanticAttributes.NetTransportValues.IP_TCP)); + assertThat(attributes.build()).isEmpty(); } @Test @@ -84,7 +76,6 @@ void fullAddress() { // then AttributesBuilder builder = Attributes.builder(); - builder.put(SemanticAttributes.NET_TRANSPORT, SemanticAttributes.NetTransportValues.IP_TCP); if (!request.isIpv4()) { builder.put(SemanticAttributes.NET_SOCK_FAMILY, "inet6"); } @@ -118,9 +109,7 @@ void unresolved() { extractor.onEnd(endAttributes, context, request, request, null); // then - assertThat(startAttributes.build()) - .containsOnly( - entry(SemanticAttributes.NET_TRANSPORT, SemanticAttributes.NetTransportValues.IP_TCP)); + assertThat(startAttributes.build()).isEmpty(); assertThat(endAttributes.build()).isEmpty(); } diff --git a/instrumentation-api/src/jmh/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBenchmark.java b/instrumentation-api/src/jmh/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBenchmark.java index 5148fe8170ff..f8bb2c5862e2 100644 --- a/instrumentation-api/src/jmh/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBenchmark.java +++ b/instrumentation-api/src/jmh/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBenchmark.java @@ -11,7 +11,6 @@ import io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientAttributesGetter; import io.opentelemetry.instrumentation.api.instrumenter.http.HttpSpanNameExtractor; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import java.util.Collections; import java.util.List; @@ -95,12 +94,6 @@ static class ConstantNetAttributesGetter private static final InetSocketAddress PEER_ADDRESS = InetSocketAddress.createUnresolved("localhost", 8080); - @Nullable - @Override - public String getTransport(Void request, @Nullable Void response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(Void unused, @Nullable Void unused2) { diff --git a/instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/client/AkkaHttpNetAttributesGetter.java b/instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/client/AkkaHttpNetAttributesGetter.java index 0328d9c5a592..5bbf5c59430e 100644 --- a/instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/client/AkkaHttpNetAttributesGetter.java +++ b/instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/client/AkkaHttpNetAttributesGetter.java @@ -9,16 +9,10 @@ import akka.http.scaladsl.model.HttpResponse; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; import io.opentelemetry.javaagent.instrumentation.akkahttp.AkkaHttpUtil; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; class AkkaHttpNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(HttpRequest httpRequest, @Nullable HttpResponse httpResponse) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(HttpRequest httpRequest, @Nullable HttpResponse httpResponse) { diff --git a/instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/AkkaNetServerAttributesGetter.java b/instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/AkkaNetServerAttributesGetter.java index 9272b34dbb8e..0fc105251c5f 100644 --- a/instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/AkkaNetServerAttributesGetter.java +++ b/instrumentation/akka/akka-http-10.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/akkahttp/server/AkkaNetServerAttributesGetter.java @@ -13,12 +13,6 @@ // TODO (trask) capture net attributes? class AkkaNetServerAttributesGetter implements NetServerAttributesGetter { - @Nullable - @Override - public String getTransport(HttpRequest request) { - return null; - } - @Nullable @Override public String getProtocolName(HttpRequest request) { diff --git a/instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/internal/DubboNetClientAttributesGetter.java b/instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/internal/DubboNetClientAttributesGetter.java index f82e1ea43d92..262d42830aa6 100644 --- a/instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/internal/DubboNetClientAttributesGetter.java +++ b/instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/internal/DubboNetClientAttributesGetter.java @@ -18,12 +18,6 @@ public final class DubboNetClientAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - @Nullable - public String getTransport(DubboRequest request, @Nullable Result response) { - return null; - } - @Nullable @Override public String getPeerName(DubboRequest request) { diff --git a/instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/internal/DubboNetServerAttributesGetter.java b/instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/internal/DubboNetServerAttributesGetter.java index 6888f6085b8e..b9143f84fe87 100644 --- a/instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/internal/DubboNetServerAttributesGetter.java +++ b/instrumentation/apache-dubbo-2.7/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/apachedubbo/v2_7/internal/DubboNetServerAttributesGetter.java @@ -17,12 +17,6 @@ public final class DubboNetServerAttributesGetter extends InetSocketAddressNetServerAttributesGetter { - @Override - @Nullable - public String getTransport(DubboRequest request) { - return null; - } - @Nullable @Override public String getHostName(DubboRequest request) { diff --git a/instrumentation/apache-httpasyncclient-4.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpasyncclient/ApacheHttpAsyncClientNetAttributesGetter.java b/instrumentation/apache-httpasyncclient-4.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpasyncclient/ApacheHttpAsyncClientNetAttributesGetter.java index 7f2fb4946843..9021d7997e84 100644 --- a/instrumentation/apache-httpasyncclient-4.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpasyncclient/ApacheHttpAsyncClientNetAttributesGetter.java +++ b/instrumentation/apache-httpasyncclient-4.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpasyncclient/ApacheHttpAsyncClientNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.apachehttpasyncclient; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import javax.annotation.Nullable; import org.apache.http.HttpResponse; @@ -14,11 +13,6 @@ final class ApacheHttpAsyncClientNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - public String getTransport(ApacheHttpClientRequest request, @Nullable HttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getProtocolName(ApacheHttpClientRequest request, @Nullable HttpResponse response) { return request.getProtocolName(); diff --git a/instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientNetAttributesGetter.java b/instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientNetAttributesGetter.java index 9a120ce1ec50..c84a58a85a34 100644 --- a/instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientNetAttributesGetter.java +++ b/instrumentation/apache-httpclient/apache-httpclient-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v2_0/ApacheHttpClientNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.apachehttpclient.v2_0; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import org.apache.commons.httpclient.HostConfiguration; import org.apache.commons.httpclient.HttpMethod; @@ -15,11 +14,6 @@ final class ApacheHttpClientNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(HttpMethod request, @Nullable HttpMethod response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getProtocolName(HttpMethod request, @Nullable HttpMethod response) { return "http"; diff --git a/instrumentation/apache-httpclient/apache-httpclient-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v4_0/ApacheHttpClientNetAttributesGetter.java b/instrumentation/apache-httpclient/apache-httpclient-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v4_0/ApacheHttpClientNetAttributesGetter.java index c0e74e7596e0..77fb7adf03aa 100644 --- a/instrumentation/apache-httpclient/apache-httpclient-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v4_0/ApacheHttpClientNetAttributesGetter.java +++ b/instrumentation/apache-httpclient/apache-httpclient-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v4_0/ApacheHttpClientNetAttributesGetter.java @@ -6,18 +6,12 @@ package io.opentelemetry.javaagent.instrumentation.apachehttpclient.v4_0; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import org.apache.http.HttpResponse; final class ApacheHttpClientNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(ApacheHttpClientRequest request, @Nullable HttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getProtocolName(ApacheHttpClientRequest request, @Nullable HttpResponse response) { return request.getProtocolName(); diff --git a/instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientNetAttributesGetter.java b/instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientNetAttributesGetter.java index c1c2975111a7..cbb0cc2e4d96 100644 --- a/instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientNetAttributesGetter.java +++ b/instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.apachehttpclient.v4_3; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import javax.annotation.Nullable; import org.apache.http.HttpResponse; @@ -14,11 +13,6 @@ final class ApacheHttpClientNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - public String getTransport(ApacheHttpClientRequest request, @Nullable HttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getProtocolName(ApacheHttpClientRequest request, @Nullable HttpResponse response) { return request.getProtocolName(); diff --git a/instrumentation/apache-httpclient/apache-httpclient-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v5_0/ApacheHttpClientNetAttributesGetter.java b/instrumentation/apache-httpclient/apache-httpclient-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v5_0/ApacheHttpClientNetAttributesGetter.java index 92e559bb26c6..5977024bea74 100644 --- a/instrumentation/apache-httpclient/apache-httpclient-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v5_0/ApacheHttpClientNetAttributesGetter.java +++ b/instrumentation/apache-httpclient/apache-httpclient-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/apachehttpclient/v5_0/ApacheHttpClientNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.apachehttpclient.v5_0; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import org.apache.hc.core5.http.HttpRequest; import org.apache.hc.core5.http.HttpResponse; @@ -15,11 +14,6 @@ final class ApacheHttpClientNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(HttpRequest request, @Nullable HttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(HttpRequest request, @Nullable HttpResponse response) { diff --git a/instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaNetServerAttributesGetter.java b/instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaNetServerAttributesGetter.java index f45edcf7b3e7..2c39e11f81f4 100644 --- a/instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaNetServerAttributesGetter.java +++ b/instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaNetServerAttributesGetter.java @@ -8,7 +8,6 @@ import com.linecorp.armeria.common.RequestContext; import com.linecorp.armeria.common.SessionProtocol; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import java.net.SocketAddress; import javax.annotation.Nullable; @@ -16,11 +15,6 @@ final class ArmeriaNetServerAttributesGetter extends InetSocketAddressNetServerAttributesGetter { - @Override - public String getTransport(RequestContext ctx) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getProtocolName(RequestContext ctx) { return "http"; diff --git a/instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/internal/ArmeriaNetClientAttributesGetter.java b/instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/internal/ArmeriaNetClientAttributesGetter.java index ba91da29c6d0..22349240b0af 100644 --- a/instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/internal/ArmeriaNetClientAttributesGetter.java +++ b/instrumentation/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/internal/ArmeriaNetClientAttributesGetter.java @@ -10,7 +10,6 @@ import com.linecorp.armeria.common.SessionProtocol; import com.linecorp.armeria.common.logging.RequestLog; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import java.net.SocketAddress; import javax.annotation.Nullable; @@ -22,11 +21,6 @@ public final class ArmeriaNetClientAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - public String getTransport(RequestContext ctx, @Nullable RequestLog requestLog) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getProtocolName(RequestContext ctx, @Nullable RequestLog requestLog) { return "http"; diff --git a/instrumentation/async-http-client/async-http-client-1.9/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_9/AsyncHttpClientNetAttributesGetter.java b/instrumentation/async-http-client/async-http-client-1.9/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_9/AsyncHttpClientNetAttributesGetter.java index c6acad7f073e..2d9caaedf20b 100644 --- a/instrumentation/async-http-client/async-http-client-1.9/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_9/AsyncHttpClientNetAttributesGetter.java +++ b/instrumentation/async-http-client/async-http-client-1.9/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v1_9/AsyncHttpClientNetAttributesGetter.java @@ -8,17 +8,11 @@ import com.ning.http.client.Request; import com.ning.http.client.Response; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; final class AsyncHttpClientNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(Request request, @Nullable Response response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(Request request, @Nullable Response response) { diff --git a/instrumentation/async-http-client/async-http-client-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v2_0/AsyncHttpClientNetAttributesGetter.java b/instrumentation/async-http-client/async-http-client-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v2_0/AsyncHttpClientNetAttributesGetter.java index 77788cabba0e..75bcad45eae8 100644 --- a/instrumentation/async-http-client/async-http-client-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v2_0/AsyncHttpClientNetAttributesGetter.java +++ b/instrumentation/async-http-client/async-http-client-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/asynchttpclient/v2_0/AsyncHttpClientNetAttributesGetter.java @@ -8,7 +8,6 @@ import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.HttpVersion; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import javax.annotation.Nullable; import org.asynchttpclient.Response; @@ -17,11 +16,6 @@ final class AsyncHttpClientNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - public String getTransport(RequestContext request, @Nullable Response response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(RequestContext request, @Nullable Response response) { diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/S3TracingTest.groovy b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/S3TracingTest.groovy index ce934e6b7bcd..39e09dde97e8 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/S3TracingTest.groovy +++ b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/S3TracingTest.groovy @@ -9,7 +9,6 @@ import spock.lang.Shared import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.SpanKind.CONSUMER -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP class S3TracingTest extends AgentInstrumentationSpecification { @@ -61,7 +60,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -87,7 +85,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -113,7 +110,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -139,7 +135,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -165,7 +160,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -190,7 +184,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -215,7 +208,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -239,7 +231,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.url" String "$SemanticAttributes.USER_AGENT_ORIGINAL" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -269,7 +260,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -294,7 +284,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -319,7 +308,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 204 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -344,7 +332,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 204 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -369,7 +356,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -424,7 +410,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -449,7 +434,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -474,7 +458,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -498,7 +481,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -522,7 +504,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -547,7 +528,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -571,7 +551,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -596,7 +575,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -622,7 +600,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -647,7 +624,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -676,7 +652,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -702,7 +677,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.url" String "$SemanticAttributes.USER_AGENT_ORIGINAL" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -727,7 +701,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -752,7 +725,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 204 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -777,7 +749,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 204 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -802,7 +773,6 @@ class S3TracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/SnsTracingTest.groovy b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/SnsTracingTest.groovy index ffa82155cd11..be0845bed214 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/SnsTracingTest.groovy +++ b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/SnsTracingTest.groovy @@ -9,7 +9,6 @@ import spock.lang.Shared import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.SpanKind.CONSUMER -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP class SnsTracingTest extends AgentInstrumentationSpecification { @@ -54,7 +53,6 @@ class SnsTracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -79,7 +77,6 @@ class SnsTracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -104,7 +101,6 @@ class SnsTracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -128,7 +124,6 @@ class SnsTracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -152,7 +147,6 @@ class SnsTracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -175,7 +169,6 @@ class SnsTracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -198,7 +191,6 @@ class SnsTracingTest extends AgentInstrumentationSpecification { "http.url" String "$SemanticAttributes.USER_AGENT_ORIGINAL" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } @@ -226,7 +218,6 @@ class SnsTracingTest extends AgentInstrumentationSpecification { "http.status_code" 200 "http.url" String "net.peer.name" String - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.port" { it == null || Number } diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/Aws1ClientTest.groovy b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/Aws1ClientTest.groovy index 3a224b1ed858..c4a4593ef0c1 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/Aws1ClientTest.groovy +++ b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/awssdk/v1_11/Aws1ClientTest.groovy @@ -19,7 +19,6 @@ import io.opentelemetry.instrumentation.test.AgentTestTrait import io.opentelemetry.semconv.trace.attributes.SemanticAttributes import static io.opentelemetry.api.trace.StatusCode.ERROR -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP class Aws1ClientTest extends AbstractAws1ClientTest implements AgentTestTrait { @Override @@ -97,7 +96,6 @@ class Aws1ClientTest extends AbstractAws1ClientTest implements AgentTestTrait { errorEvent IllegalStateException, "bad handler" hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.HTTP_URL" "https://s3.amazonaws.com" "$SemanticAttributes.HTTP_METHOD" "HEAD" "$SemanticAttributes.NET_PEER_NAME" "s3.amazonaws.com" diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test_before_1_11_106/groovy/Aws0ClientTest.groovy b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test_before_1_11_106/groovy/Aws0ClientTest.groovy index f0981d7bbd91..c2b1f9cb25e2 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test_before_1_11_106/groovy/Aws0ClientTest.groovy +++ b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/src/test_before_1_11_106/groovy/Aws0ClientTest.groovy @@ -34,7 +34,6 @@ import java.time.Duration import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.StatusCode.ERROR import static io.opentelemetry.instrumentation.test.utils.PortUtils.UNUSABLE_PORT -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP class Aws0ClientTest extends AgentInstrumentationSpecification { @@ -105,7 +104,6 @@ class Aws0ClientTest extends AgentInstrumentationSpecification { kind CLIENT hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.HTTP_URL" "${server.httpUri()}" "$SemanticAttributes.HTTP_METHOD" "$method" "$SemanticAttributes.HTTP_STATUS_CODE" 200 @@ -170,7 +168,6 @@ class Aws0ClientTest extends AgentInstrumentationSpecification { errorEvent AmazonClientException, ~/Unable to execute HTTP request/ hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.HTTP_URL" "http://localhost:${UNUSABLE_PORT}" "$SemanticAttributes.HTTP_METHOD" "$method" "$SemanticAttributes.NET_PEER_PORT" 61 @@ -218,7 +215,6 @@ class Aws0ClientTest extends AgentInstrumentationSpecification { errorEvent IllegalStateException, "bad handler" hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.HTTP_URL" "https://s3.amazonaws.com" "$SemanticAttributes.HTTP_METHOD" "GET" "$SemanticAttributes.NET_PEER_NAME" "s3.amazonaws.com" @@ -261,7 +257,6 @@ class Aws0ClientTest extends AgentInstrumentationSpecification { errorEvent AmazonClientException, ~/Unable to execute HTTP request/ hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.HTTP_URL" "${server.httpUri()}" "$SemanticAttributes.HTTP_METHOD" "GET" "$SemanticAttributes.NET_PEER_PORT" server.httpPort() diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkNetAttributesGetter.java b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkNetAttributesGetter.java index 62bca1503f7e..d764a3acc6cf 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkNetAttributesGetter.java +++ b/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkNetAttributesGetter.java @@ -9,18 +9,12 @@ import com.amazonaws.Response; import com.amazonaws.http.HttpResponse; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import org.apache.http.ProtocolVersion; import org.apache.http.client.methods.HttpRequestBase; class AwsSdkNetAttributesGetter implements NetClientAttributesGetter, Response> { - @Override - public String getTransport(Request request, @Nullable Response response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(Request request, @Nullable Response response) { diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractAws1ClientTest.groovy b/instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractAws1ClientTest.groovy index d408c7bea858..fe27ec4d6ece 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractAws1ClientTest.groovy +++ b/instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractAws1ClientTest.groovy @@ -43,7 +43,6 @@ import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.SpanKind.PRODUCER import static io.opentelemetry.api.trace.StatusCode.ERROR import static io.opentelemetry.instrumentation.test.utils.PortUtils.UNUSABLE_PORT -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP abstract class AbstractAws1ClientTest extends InstrumentationSpecification { @@ -103,7 +102,6 @@ abstract class AbstractAws1ClientTest extends InstrumentationSpecification { kind operation == "SendMessage" ? PRODUCER : CLIENT hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.HTTP_URL" "${server.httpUri()}" "$SemanticAttributes.HTTP_METHOD" "$method" "$SemanticAttributes.HTTP_STATUS_CODE" 200 @@ -184,7 +182,6 @@ abstract class AbstractAws1ClientTest extends InstrumentationSpecification { errorEvent SdkClientException, ~/Unable to execute HTTP request/ hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.HTTP_URL" "http://127.0.0.1:${UNUSABLE_PORT}" "$SemanticAttributes.HTTP_METHOD" "$method" "$SemanticAttributes.NET_PEER_NAME" "127.0.0.1" @@ -240,7 +237,6 @@ abstract class AbstractAws1ClientTest extends InstrumentationSpecification { } hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.HTTP_URL" "${server.httpUri()}" "$SemanticAttributes.HTTP_METHOD" "GET" "$SemanticAttributes.NET_PEER_PORT" server.httpPort() diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractSqsTracingTest.groovy b/instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractSqsTracingTest.groovy index 6af66796cc66..9d1b03492464 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractSqsTracingTest.groovy +++ b/instrumentation/aws-sdk/aws-sdk-1.11/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v1_11/AbstractSqsTracingTest.groovy @@ -21,7 +21,6 @@ import spock.lang.Shared import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.SpanKind.CONSUMER import static io.opentelemetry.api.trace.SpanKind.PRODUCER -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP abstract class AbstractSqsTracingTest extends InstrumentationSpecification { @@ -80,7 +79,6 @@ abstract class AbstractSqsTracingTest extends InstrumentationSpecification { "http.url" "http://localhost:$sqsPort" "net.peer.name" "localhost" "net.peer.port" sqsPort - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" Long @@ -104,7 +102,6 @@ abstract class AbstractSqsTracingTest extends InstrumentationSpecification { "http.url" "http://localhost:$sqsPort" "net.peer.name" "localhost" "net.peer.port" sqsPort - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" Long @@ -127,7 +124,6 @@ abstract class AbstractSqsTracingTest extends InstrumentationSpecification { "$SemanticAttributes.USER_AGENT_ORIGINAL" String "net.peer.name" "localhost" "net.peer.port" sqsPort - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" Long @@ -155,7 +151,6 @@ abstract class AbstractSqsTracingTest extends InstrumentationSpecification { "http.url" "http://localhost:$sqsPort" "net.peer.name" "localhost" "net.peer.port" sqsPort - "net.transport" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" Long diff --git a/instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkNetAttributesGetter.java b/instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkNetAttributesGetter.java index 23d6e732eaad..c39db6d19170 100644 --- a/instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkNetAttributesGetter.java +++ b/instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/AwsSdkNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.awssdk.v2_2; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import software.amazon.awssdk.core.interceptor.ExecutionAttributes; import software.amazon.awssdk.http.SdkHttpRequest; @@ -15,11 +14,6 @@ class AwsSdkNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(ExecutionAttributes request, @Nullable SdkHttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override @Nullable public String getPeerName(ExecutionAttributes request) { diff --git a/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy b/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy index 81375e544298..dcf56a922662 100644 --- a/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy +++ b/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2ClientTest.groovy @@ -59,7 +59,6 @@ import static com.google.common.collect.ImmutableMap.of import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.SpanKind.PRODUCER import static io.opentelemetry.api.trace.StatusCode.ERROR -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP @Unroll abstract class AbstractAws2ClientTest extends InstrumentationSpecification { @@ -161,7 +160,6 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification { kind CLIENT hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_PEER_NAME" "127.0.0.1" "$SemanticAttributes.NET_PEER_PORT" server.httpPort() "$SemanticAttributes.HTTP_URL" { it.startsWith("${server.httpUri()}${path}") } @@ -198,7 +196,6 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification { kind CLIENT hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_PEER_NAME" "127.0.0.1" "$SemanticAttributes.NET_PEER_PORT" server.httpPort() "$SemanticAttributes.HTTP_URL" { it.startsWith("${server.httpUri()}${path}") } @@ -234,7 +231,6 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification { kind CLIENT hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_PEER_NAME" "127.0.0.1" "$SemanticAttributes.NET_PEER_PORT" server.httpPort() "$SemanticAttributes.HTTP_URL" { it.startsWith("${server.httpUri()}${path}") } @@ -348,7 +344,6 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification { kind operation != "SendMessage" ? CLIENT : PRODUCER hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_PEER_NAME" "127.0.0.1" "$SemanticAttributes.NET_PEER_PORT" server.httpPort() "$SemanticAttributes.HTTP_URL" { it.startsWith("${server.httpUri()}${path}") } @@ -439,7 +434,6 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification { kind operation != "SendMessage" ? CLIENT : PRODUCER hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_PEER_NAME" "127.0.0.1" "$SemanticAttributes.NET_PEER_PORT" server.httpPort() "$SemanticAttributes.HTTP_URL" { it.startsWith("${server.httpUri()}${path}") } @@ -540,7 +534,6 @@ abstract class AbstractAws2ClientTest extends InstrumentationSpecification { errorEvent SdkClientException, "Unable to execute HTTP request: Read timed out" hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_PEER_NAME" "127.0.0.1" "$SemanticAttributes.NET_PEER_PORT" server.httpPort() "$SemanticAttributes.HTTP_URL" "${server.httpUri()}${path}" diff --git a/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2SqsTracingTest.groovy b/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2SqsTracingTest.groovy index 48234de503b6..fec8da9daee3 100644 --- a/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2SqsTracingTest.groovy +++ b/instrumentation/aws-sdk/aws-sdk-2.2/testing/src/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2SqsTracingTest.groovy @@ -23,7 +23,6 @@ import spock.lang.Shared import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.SpanKind.CONSUMER import static io.opentelemetry.api.trace.SpanKind.PRODUCER -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP abstract class AbstractAws2SqsTracingTest extends InstrumentationSpecification { @@ -103,7 +102,6 @@ abstract class AbstractAws2SqsTracingTest extends InstrumentationSpecification { "$SemanticAttributes.USER_AGENT_ORIGINAL" String "net.peer.name" "localhost" "net.peer.port" sqsPort - "net.transport" IP_TCP "$SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH" { it == null || it instanceof Long } "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" { it == null || it instanceof Long } } @@ -127,7 +125,6 @@ abstract class AbstractAws2SqsTracingTest extends InstrumentationSpecification { "$SemanticAttributes.USER_AGENT_ORIGINAL" String "net.peer.name" "localhost" "net.peer.port" sqsPort - "net.transport" IP_TCP "$SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH" { it == null || it instanceof Long } "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" { it == null || it instanceof Long } } @@ -146,7 +143,6 @@ abstract class AbstractAws2SqsTracingTest extends InstrumentationSpecification { "http.url" { it.startsWith("http://localhost:$sqsPort") } "net.peer.name" "localhost" "net.peer.port" sqsPort - "net.transport" IP_TCP "$SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH" { it == null || it instanceof Long } "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" { it == null || it instanceof Long } } @@ -174,7 +170,6 @@ abstract class AbstractAws2SqsTracingTest extends InstrumentationSpecification { "$SemanticAttributes.USER_AGENT_ORIGINAL" String "net.peer.name" "localhost" "net.peer.port" sqsPort - "net.transport" IP_TCP "$SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH" { it == null || it instanceof Long } "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" { it == null || it instanceof Long } } diff --git a/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/RestCamelTest.groovy b/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/RestCamelTest.groovy index 1d7eeced01e4..9c18ec4832d8 100644 --- a/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/RestCamelTest.groovy +++ b/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/RestCamelTest.groovy @@ -15,8 +15,9 @@ import org.springframework.boot.SpringApplication import org.springframework.context.ConfigurableApplicationContext import spock.lang.Shared -import static io.opentelemetry.api.trace.SpanKind.* -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP +import static io.opentelemetry.api.trace.SpanKind.CLIENT +import static io.opentelemetry.api.trace.SpanKind.INTERNAL +import static io.opentelemetry.api.trace.SpanKind.SERVER class RestCamelTest extends AgentInstrumentationSpecification implements RetryOnAddressAlreadyInUseTrait { @@ -92,7 +93,6 @@ class RestCamelTest extends AgentInstrumentationSpecification implements RetryOn "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_METHOD" "GET" "$SemanticAttributes.HTTP_ROUTE" "/api/{module}/unit/{unitId}" - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" diff --git a/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/TwoServicesWithDirectClientCamelTest.groovy b/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/TwoServicesWithDirectClientCamelTest.groovy index 27dac929d026..0231b4109d8a 100644 --- a/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/TwoServicesWithDirectClientCamelTest.groovy +++ b/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/TwoServicesWithDirectClientCamelTest.groovy @@ -17,8 +17,9 @@ import org.springframework.boot.SpringApplication import org.springframework.context.ConfigurableApplicationContext import spock.lang.Shared -import static io.opentelemetry.api.trace.SpanKind.* -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP +import static io.opentelemetry.api.trace.SpanKind.CLIENT +import static io.opentelemetry.api.trace.SpanKind.INTERNAL +import static io.opentelemetry.api.trace.SpanKind.SERVER class TwoServicesWithDirectClientCamelTest extends AgentInstrumentationSpecification implements RetryOnAddressAlreadyInUseTrait { @@ -128,7 +129,6 @@ class TwoServicesWithDirectClientCamelTest extends AgentInstrumentationSpecifica "$SemanticAttributes.USER_AGENT_ORIGINAL" "Jakarta Commons-HttpClient/3.1" "$SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH" Long "$SemanticAttributes.HTTP_ROUTE" "/serviceTwo" - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "127.0.0.1" diff --git a/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/aws/AwsSpan.groovy b/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/aws/AwsSpan.groovy index e3dda97c9c70..03f68912db45 100644 --- a/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/aws/AwsSpan.groovy +++ b/instrumentation/camel-2.20/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/apachecamel/aws/AwsSpan.groovy @@ -9,7 +9,6 @@ import io.opentelemetry.instrumentation.test.asserts.TraceAssert import io.opentelemetry.semconv.trace.attributes.SemanticAttributes import static io.opentelemetry.api.trace.SpanKind.CLIENT -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP class AwsSpan { @@ -35,7 +34,6 @@ class AwsSpan { "net.protocol.name" "http" "net.protocol.version" "1.1" "net.peer.name" String - "net.transport" IP_TCP "net.peer.port" { it == null || it instanceof Number } } } @@ -68,7 +66,6 @@ class AwsSpan { "net.protocol.version" "1.1" "net.peer.name" String "net.peer.port" { it == null || it instanceof Number } - "net.transport" IP_TCP } } } @@ -95,7 +92,6 @@ class AwsSpan { "net.protocol.version" "1.1" "net.peer.name" String "net.peer.port" { it == null || it instanceof Number } - "net.transport" IP_TCP } } } diff --git a/instrumentation/cassandra/cassandra-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v3_0/CassandraNetAttributesGetter.java b/instrumentation/cassandra/cassandra-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v3_0/CassandraNetAttributesGetter.java index 6d95455e64af..0b0903278c9e 100644 --- a/instrumentation/cassandra/cassandra-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v3_0/CassandraNetAttributesGetter.java +++ b/instrumentation/cassandra/cassandra-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v3_0/CassandraNetAttributesGetter.java @@ -13,12 +13,6 @@ final class CassandraNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - @Nullable - public String getTransport(CassandraRequest request, @Nullable ExecutionInfo executionInfo) { - return null; - } - @Nullable @Override public String getPeerName(CassandraRequest request) { diff --git a/instrumentation/cassandra/cassandra-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v4_0/CassandraNetAttributesGetter.java b/instrumentation/cassandra/cassandra-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v4_0/CassandraNetAttributesGetter.java index 5d3dd467e680..4afc39a9758a 100644 --- a/instrumentation/cassandra/cassandra-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v4_0/CassandraNetAttributesGetter.java +++ b/instrumentation/cassandra/cassandra-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/cassandra/v4_0/CassandraNetAttributesGetter.java @@ -15,12 +15,6 @@ final class CassandraNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - @Nullable - public String getTransport(CassandraRequest request, @Nullable ExecutionInfo executionInfo) { - return null; - } - @Nullable @Override public String getPeerName(CassandraRequest request) { diff --git a/instrumentation/cassandra/cassandra-4.4/library/src/main/java/io/opentelemetry/instrumentation/cassandra/v4_4/CassandraNetAttributesGetter.java b/instrumentation/cassandra/cassandra-4.4/library/src/main/java/io/opentelemetry/instrumentation/cassandra/v4_4/CassandraNetAttributesGetter.java index 27e64d5e302a..c497a86fa383 100644 --- a/instrumentation/cassandra/cassandra-4.4/library/src/main/java/io/opentelemetry/instrumentation/cassandra/v4_4/CassandraNetAttributesGetter.java +++ b/instrumentation/cassandra/cassandra-4.4/library/src/main/java/io/opentelemetry/instrumentation/cassandra/v4_4/CassandraNetAttributesGetter.java @@ -15,12 +15,6 @@ final class CassandraNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - @Nullable - public String getTransport(CassandraRequest request, @Nullable ExecutionInfo executionInfo) { - return null; - } - @Nullable @Override public String getPeerName(CassandraRequest request) { diff --git a/instrumentation/couchbase/couchbase-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v2_0/CouchbaseNetAttributesGetter.java b/instrumentation/couchbase/couchbase-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v2_0/CouchbaseNetAttributesGetter.java index ff971d4f19ab..3b2aedb204b5 100644 --- a/instrumentation/couchbase/couchbase-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v2_0/CouchbaseNetAttributesGetter.java +++ b/instrumentation/couchbase/couchbase-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/couchbase/v2_0/CouchbaseNetAttributesGetter.java @@ -6,20 +6,12 @@ package io.opentelemetry.javaagent.instrumentation.couchbase.v2_0; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import java.net.SocketAddress; import javax.annotation.Nullable; public class CouchbaseNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Nullable - @Override - public String getTransport(CouchbaseRequestInfo couchbaseRequest, @Nullable Void unused) { - return couchbaseRequest.getPeerAddress() != null - ? SemanticAttributes.NetTransportValues.IP_TCP - : null; - } @Nullable @Override diff --git a/instrumentation/couchbase/couchbase-2.6/javaagent/src/test/groovy/CouchbaseSpanUtil.groovy b/instrumentation/couchbase/couchbase-2.6/javaagent/src/test/groovy/CouchbaseSpanUtil.groovy index cf9b1a76e160..9dcec7802c66 100644 --- a/instrumentation/couchbase/couchbase-2.6/javaagent/src/test/groovy/CouchbaseSpanUtil.groovy +++ b/instrumentation/couchbase/couchbase-2.6/javaagent/src/test/groovy/CouchbaseSpanUtil.groovy @@ -8,7 +8,6 @@ import io.opentelemetry.sdk.trace.data.SpanData import io.opentelemetry.semconv.trace.attributes.SemanticAttributes import static io.opentelemetry.api.trace.SpanKind.CLIENT -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP class CouchbaseSpanUtil { // Reusable span assertion method. Cannot directly override AbstractCouchbaseTest.assertCouchbaseSpan because @@ -34,7 +33,6 @@ class CouchbaseSpanUtil { "$SemanticAttributes.DB_STATEMENT" statement "$SemanticAttributes.DB_OPERATION"(operation ?: spanName) - "$SemanticAttributes.NET_TRANSPORT" { it == null || it == IP_TCP } // Because of caching, not all requests hit the server so these attributes may be absent "$SemanticAttributes.NET_SOCK_PEER_ADDR" { it == "127.0.0.1" || it == null } "$SemanticAttributes.NET_SOCK_PEER_NAME" { it == "localhost" || it == "127.0.0.1" || it == null } diff --git a/instrumentation/elasticsearch/elasticsearch-rest-5.0/javaagent/src/test/groovy/ElasticsearchRest5Test.groovy b/instrumentation/elasticsearch/elasticsearch-rest-5.0/javaagent/src/test/groovy/ElasticsearchRest5Test.groovy index 93928ff0f0db..a8c76d3f3e2e 100644 --- a/instrumentation/elasticsearch/elasticsearch-rest-5.0/javaagent/src/test/groovy/ElasticsearchRest5Test.groovy +++ b/instrumentation/elasticsearch/elasticsearch-rest-5.0/javaagent/src/test/groovy/ElasticsearchRest5Test.groovy @@ -79,7 +79,6 @@ class ElasticsearchRest5Test extends AgentInstrumentationSpecification { "$SemanticAttributes.DB_SYSTEM" "elasticsearch" "$SemanticAttributes.DB_OPERATION" "GET" "$SemanticAttributes.DB_STATEMENT" "GET _cluster/health" - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP } } span(1) { @@ -87,7 +86,6 @@ class ElasticsearchRest5Test extends AgentInstrumentationSpecification { kind CLIENT childOf span(0) attributes { - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "$SemanticAttributes.NET_PEER_NAME" httpHost.hostName "$SemanticAttributes.NET_PEER_PORT" httpHost.port "$SemanticAttributes.HTTP_METHOD" "GET" @@ -153,7 +151,6 @@ class ElasticsearchRest5Test extends AgentInstrumentationSpecification { "$SemanticAttributes.DB_SYSTEM" "elasticsearch" "$SemanticAttributes.DB_OPERATION" "GET" "$SemanticAttributes.DB_STATEMENT" "GET _cluster/health" - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP } } span(2) { @@ -161,7 +158,6 @@ class ElasticsearchRest5Test extends AgentInstrumentationSpecification { kind CLIENT childOf span(1) attributes { - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "$SemanticAttributes.NET_PEER_NAME" httpHost.hostName "$SemanticAttributes.NET_PEER_PORT" httpHost.port "$SemanticAttributes.HTTP_METHOD" "GET" diff --git a/instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/src/test/groovy/ElasticsearchRest6Test.groovy b/instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/src/test/groovy/ElasticsearchRest6Test.groovy index 4259e4320dee..f8ca09caa5a0 100644 --- a/instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/src/test/groovy/ElasticsearchRest6Test.groovy +++ b/instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/src/test/groovy/ElasticsearchRest6Test.groovy @@ -73,7 +73,6 @@ class ElasticsearchRest6Test extends AgentInstrumentationSpecification { "$SemanticAttributes.DB_SYSTEM" "elasticsearch" "$SemanticAttributes.DB_OPERATION" "GET" "$SemanticAttributes.DB_STATEMENT" "GET _cluster/health" - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP } } span(1) { @@ -81,7 +80,6 @@ class ElasticsearchRest6Test extends AgentInstrumentationSpecification { kind CLIENT childOf span(0) attributes { - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "$SemanticAttributes.NET_PEER_NAME" httpHost.hostName "$SemanticAttributes.NET_PEER_PORT" httpHost.port "$SemanticAttributes.HTTP_METHOD" "GET" @@ -146,7 +144,6 @@ class ElasticsearchRest6Test extends AgentInstrumentationSpecification { "$SemanticAttributes.DB_SYSTEM" "elasticsearch" "$SemanticAttributes.DB_OPERATION" "GET" "$SemanticAttributes.DB_STATEMENT" "GET _cluster/health" - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP } } span(2) { @@ -154,7 +151,6 @@ class ElasticsearchRest6Test extends AgentInstrumentationSpecification { kind CLIENT childOf span(1) attributes { - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "$SemanticAttributes.NET_PEER_NAME" httpHost.hostName "$SemanticAttributes.NET_PEER_PORT" httpHost.port "$SemanticAttributes.HTTP_METHOD" "GET" diff --git a/instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/src/test/groovy/ElasticsearchRest7Test.groovy b/instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/src/test/groovy/ElasticsearchRest7Test.groovy index 4fe41f205b1b..299795ddf1cb 100644 --- a/instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/src/test/groovy/ElasticsearchRest7Test.groovy +++ b/instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/src/test/groovy/ElasticsearchRest7Test.groovy @@ -72,7 +72,6 @@ class ElasticsearchRest7Test extends AgentInstrumentationSpecification { "$SemanticAttributes.DB_SYSTEM" "elasticsearch" "$SemanticAttributes.DB_OPERATION" "GET" "$SemanticAttributes.DB_STATEMENT" "GET _cluster/health" - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP } } span(1) { @@ -80,7 +79,6 @@ class ElasticsearchRest7Test extends AgentInstrumentationSpecification { kind CLIENT childOf span(0) attributes { - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "$SemanticAttributes.NET_PEER_NAME" httpHost.hostName "$SemanticAttributes.NET_PEER_PORT" httpHost.port "$SemanticAttributes.HTTP_METHOD" "GET" @@ -145,7 +143,6 @@ class ElasticsearchRest7Test extends AgentInstrumentationSpecification { "$SemanticAttributes.DB_SYSTEM" "elasticsearch" "$SemanticAttributes.DB_OPERATION" "GET" "$SemanticAttributes.DB_STATEMENT" "GET _cluster/health" - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP } } span(2) { @@ -153,7 +150,6 @@ class ElasticsearchRest7Test extends AgentInstrumentationSpecification { kind CLIENT childOf span(1) attributes { - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "$SemanticAttributes.NET_PEER_NAME" httpHost.hostName "$SemanticAttributes.NET_PEER_PORT" httpHost.port "$SemanticAttributes.HTTP_METHOD" "GET" diff --git a/instrumentation/elasticsearch/elasticsearch-rest-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/rest/ElasticsearchRestNetResponseAttributesGetter.java b/instrumentation/elasticsearch/elasticsearch-rest-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/rest/ElasticsearchRestNetResponseAttributesGetter.java index 71779c0ba3bf..e38beb7f9a9d 100644 --- a/instrumentation/elasticsearch/elasticsearch-rest-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/rest/ElasticsearchRestNetResponseAttributesGetter.java +++ b/instrumentation/elasticsearch/elasticsearch-rest-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/rest/ElasticsearchRestNetResponseAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.elasticsearch.rest; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.Inet6Address; import javax.annotation.Nullable; import org.elasticsearch.client.Response; @@ -14,11 +13,6 @@ final class ElasticsearchRestNetResponseAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(ElasticsearchRestRequest request, Response response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override @Nullable public String getPeerName(ElasticsearchRestRequest request) { diff --git a/instrumentation/elasticsearch/elasticsearch-transport-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/v6_0/Elasticsearch6TransportNetAttributesGetter.java b/instrumentation/elasticsearch/elasticsearch-transport-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/v6_0/Elasticsearch6TransportNetAttributesGetter.java index c2d82509f096..bb8d058dcf21 100644 --- a/instrumentation/elasticsearch/elasticsearch-transport-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/v6_0/Elasticsearch6TransportNetAttributesGetter.java +++ b/instrumentation/elasticsearch/elasticsearch-transport-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/v6_0/Elasticsearch6TransportNetAttributesGetter.java @@ -13,11 +13,6 @@ public class Elasticsearch6TransportNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - @Nullable - public String getTransport(ElasticTransportRequest request, @Nullable ActionResponse response) { - return null; - } @Nullable @Override diff --git a/instrumentation/elasticsearch/elasticsearch-transport-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/ElasticTransportNetResponseAttributesGetter.java b/instrumentation/elasticsearch/elasticsearch-transport-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/ElasticTransportNetResponseAttributesGetter.java index 39cc4993a3ce..af48cd64c98f 100644 --- a/instrumentation/elasticsearch/elasticsearch-transport-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/ElasticTransportNetResponseAttributesGetter.java +++ b/instrumentation/elasticsearch/elasticsearch-transport-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/elasticsearch/transport/ElasticTransportNetResponseAttributesGetter.java @@ -12,12 +12,6 @@ public class ElasticTransportNetResponseAttributesGetter implements NetClientAttributesGetter { - @Override - @Nullable - public String getTransport(ElasticTransportRequest request, @Nullable ActionResponse response) { - return null; - } - @Override @Nullable public String getPeerName(ElasticTransportRequest request) { diff --git a/instrumentation/google-http-client-1.19/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/googlehttpclient/GoogleHttpClientNetAttributesGetter.java b/instrumentation/google-http-client-1.19/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/googlehttpclient/GoogleHttpClientNetAttributesGetter.java index b1f24d861a77..d1e21693f8de 100644 --- a/instrumentation/google-http-client-1.19/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/googlehttpclient/GoogleHttpClientNetAttributesGetter.java +++ b/instrumentation/google-http-client-1.19/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/googlehttpclient/GoogleHttpClientNetAttributesGetter.java @@ -8,17 +8,11 @@ import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpResponse; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; final class GoogleHttpClientNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(HttpRequest request, @Nullable HttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override @Nullable public String getPeerName(HttpRequest request) { diff --git a/instrumentation/google-http-client-1.19/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/googlehttpclient/AbstractGoogleHttpClientTest.java b/instrumentation/google-http-client-1.19/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/googlehttpclient/AbstractGoogleHttpClientTest.java index ef28596f1915..03322340885f 100644 --- a/instrumentation/google-http-client-1.19/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/googlehttpclient/AbstractGoogleHttpClientTest.java +++ b/instrumentation/google-http-client-1.19/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/googlehttpclient/AbstractGoogleHttpClientTest.java @@ -96,10 +96,7 @@ void errorTracesWhenExceptionIsNotThrown() throws Exception { .hasAttributesSatisfying( attrs -> assertThat(attrs) - .hasSize(7) - .containsEntry( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP) + .hasSize(6) .containsEntry(SemanticAttributes.NET_PEER_NAME, "localhost") .hasEntrySatisfying( SemanticAttributes.NET_PEER_PORT, diff --git a/instrumentation/grizzly-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/grizzly/GrizzlyNetAttributesGetter.java b/instrumentation/grizzly-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/grizzly/GrizzlyNetAttributesGetter.java index 5dd45bc50c2f..5cd59dc8bc23 100644 --- a/instrumentation/grizzly-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/grizzly/GrizzlyNetAttributesGetter.java +++ b/instrumentation/grizzly-2.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/grizzly/GrizzlyNetAttributesGetter.java @@ -10,14 +10,22 @@ import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter; import javax.annotation.Nullable; +import org.glassfish.grizzly.Transport; import org.glassfish.grizzly.http.HttpRequestPacket; import org.glassfish.grizzly.nio.transport.TCPNIOTransport; +import org.glassfish.grizzly.nio.transport.UDPNIOTransport; final class GrizzlyNetAttributesGetter implements NetServerAttributesGetter { @Override public String getTransport(HttpRequestPacket request) { - return request.getConnection().getTransport() instanceof TCPNIOTransport ? IP_TCP : IP_UDP; + Transport transport = request.getConnection().getTransport(); + if (transport instanceof TCPNIOTransport) { + return IP_TCP; + } else if (transport instanceof UDPNIOTransport) { + return IP_UDP; + } + return null; } @Nullable diff --git a/instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/internal/GrpcNetClientAttributesGetter.java b/instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/internal/GrpcNetClientAttributesGetter.java index 0fdb82fb3612..c21f5bb845ab 100644 --- a/instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/internal/GrpcNetClientAttributesGetter.java +++ b/instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/internal/GrpcNetClientAttributesGetter.java @@ -8,7 +8,6 @@ import io.grpc.Status; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; import io.opentelemetry.instrumentation.grpc.v1_6.GrpcRequest; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import java.net.SocketAddress; import javax.annotation.Nullable; @@ -20,11 +19,6 @@ public final class GrpcNetClientAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - public String getTransport(GrpcRequest request, @Nullable Status response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getPeerName(GrpcRequest grpcRequest) { diff --git a/instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/internal/GrpcNetServerAttributesGetter.java b/instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/internal/GrpcNetServerAttributesGetter.java index 358b21a3d8a0..733cf7b87cbc 100644 --- a/instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/internal/GrpcNetServerAttributesGetter.java +++ b/instrumentation/grpc-1.6/library/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/internal/GrpcNetServerAttributesGetter.java @@ -7,7 +7,6 @@ import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetServerAttributesGetter; import io.opentelemetry.instrumentation.grpc.v1_6.GrpcRequest; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import java.net.SocketAddress; import javax.annotation.Nullable; @@ -19,11 +18,6 @@ public final class GrpcNetServerAttributesGetter extends InetSocketAddressNetServerAttributesGetter { - @Override - public String getTransport(GrpcRequest request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getHostName(GrpcRequest grpcRequest) { diff --git a/instrumentation/grpc-1.6/testing/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/AbstractGrpcStreamingTest.java b/instrumentation/grpc-1.6/testing/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/AbstractGrpcStreamingTest.java index 750d3bfb3c5a..8c9546f99436 100644 --- a/instrumentation/grpc-1.6/testing/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/AbstractGrpcStreamingTest.java +++ b/instrumentation/grpc-1.6/testing/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/AbstractGrpcStreamingTest.java @@ -180,9 +180,6 @@ public void onCompleted() { equalTo(SemanticAttributes.RPC_SYSTEM, "grpc"), equalTo(SemanticAttributes.RPC_SERVICE, "example.Greeter"), equalTo(SemanticAttributes.RPC_METHOD, "Conversation"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), @@ -201,9 +198,6 @@ public void onCompleted() { equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), @@ -225,7 +219,6 @@ public void onCompleted() { histogram.hasPointsSatisfying( point -> point.hasAttributesSatisfying( - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo( SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo( @@ -256,7 +249,6 @@ public void onCompleted() { equalTo( SemanticAttributes.NET_PEER_PORT, server.getPort()), - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo( SemanticAttributes.RPC_METHOD, "Conversation"), equalTo( diff --git a/instrumentation/grpc-1.6/testing/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/AbstractGrpcTest.java b/instrumentation/grpc-1.6/testing/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/AbstractGrpcTest.java index 140987d116a6..83659c5af0bd 100644 --- a/instrumentation/grpc-1.6/testing/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/AbstractGrpcTest.java +++ b/instrumentation/grpc-1.6/testing/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/AbstractGrpcTest.java @@ -136,9 +136,6 @@ public void sayHello( equalTo(SemanticAttributes.RPC_SYSTEM, "grpc"), equalTo(SemanticAttributes.RPC_SERVICE, "example.Greeter"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), @@ -179,9 +176,6 @@ public void sayHello( equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), @@ -226,7 +220,6 @@ public void sayHello( histogram.hasPointsSatisfying( point -> point.hasAttributesSatisfying( - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo( SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), @@ -256,7 +249,6 @@ public void sayHello( equalTo( SemanticAttributes.NET_PEER_PORT, server.getPort()), - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), equalTo( SemanticAttributes.RPC_SERVICE, @@ -326,9 +318,6 @@ public void sayHello( equalTo(SemanticAttributes.RPC_SYSTEM, "grpc"), equalTo(SemanticAttributes.RPC_SERVICE, "example.Greeter"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), @@ -369,9 +358,6 @@ public void sayHello( equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), @@ -419,7 +405,6 @@ public void sayHello( histogram.hasPointsSatisfying( point -> point.hasAttributesSatisfying( - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo( SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), @@ -449,7 +434,6 @@ public void sayHello( equalTo( SemanticAttributes.NET_PEER_PORT, server.getPort()), - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), equalTo( SemanticAttributes.RPC_SERVICE, @@ -527,9 +511,6 @@ public void onCompleted() { equalTo(SemanticAttributes.RPC_SYSTEM, "grpc"), equalTo(SemanticAttributes.RPC_SERVICE, "example.Greeter"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), @@ -570,9 +551,6 @@ public void onCompleted() { equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), @@ -620,7 +598,6 @@ public void onCompleted() { histogram.hasPointsSatisfying( point -> point.hasAttributesSatisfying( - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo( SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), @@ -650,7 +627,6 @@ public void onCompleted() { equalTo( SemanticAttributes.NET_PEER_PORT, server.getPort()), - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), equalTo( SemanticAttributes.RPC_SERVICE, @@ -702,9 +678,6 @@ public void sayHello( equalTo(SemanticAttributes.RPC_SYSTEM, "grpc"), equalTo(SemanticAttributes.RPC_SERVICE, "example.Greeter"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) status.getCode().value()), @@ -735,9 +708,6 @@ public void sayHello( equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) status.getCode().value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), @@ -778,7 +748,6 @@ public void sayHello( histogram.hasPointsSatisfying( point -> point.hasAttributesSatisfying( - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo( SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), @@ -808,7 +777,6 @@ public void sayHello( equalTo( SemanticAttributes.NET_PEER_PORT, server.getPort()), - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), equalTo( SemanticAttributes.RPC_SERVICE, @@ -866,9 +834,6 @@ public void sayHello( equalTo(SemanticAttributes.RPC_SYSTEM, "grpc"), equalTo(SemanticAttributes.RPC_SERVICE, "example.Greeter"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.UNKNOWN.getCode().value()), @@ -899,9 +864,6 @@ public void sayHello( equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.UNKNOWN.value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), @@ -937,7 +899,6 @@ public void sayHello( histogram.hasPointsSatisfying( point -> point.hasAttributesSatisfying( - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo( SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), @@ -967,7 +928,6 @@ public void sayHello( equalTo( SemanticAttributes.NET_PEER_PORT, server.getPort()), - equalTo(SemanticAttributes.NET_TRANSPORT, "ip_tcp"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), equalTo( SemanticAttributes.RPC_SERVICE, @@ -1121,9 +1081,6 @@ public void onCompleted() { equalTo(SemanticAttributes.RPC_SYSTEM, "grpc"), equalTo(SemanticAttributes.RPC_SERVICE, "example.Greeter"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), @@ -1164,9 +1121,6 @@ public void onCompleted() { equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), @@ -1265,9 +1219,6 @@ public void onCompleted() { equalTo(SemanticAttributes.RPC_SYSTEM, "grpc"), equalTo(SemanticAttributes.RPC_SERVICE, "example.Greeter"), equalTo(SemanticAttributes.RPC_METHOD, "SayMultipleHello"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.CANCELLED.value()), @@ -1309,9 +1260,6 @@ public void onCompleted() { equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.CANCELLED.value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), @@ -1408,9 +1356,6 @@ public void onCompleted() { SemanticAttributes.RPC_SERVICE, "grpc.reflection.v1alpha.ServerReflection"), equalTo(SemanticAttributes.RPC_METHOD, "ServerReflectionInfo"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), @@ -1454,9 +1399,6 @@ public void onCompleted() { equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), @@ -1539,9 +1481,6 @@ public void sayHello( equalTo(SemanticAttributes.RPC_SYSTEM, "grpc"), equalTo(SemanticAttributes.RPC_SERVICE, "example.Greeter"), equalTo(SemanticAttributes.RPC_METHOD, "SayHello"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), @@ -1582,9 +1521,6 @@ public void sayHello( equalTo( SemanticAttributes.RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), equalTo(SemanticAttributes.NET_HOST_PORT, server.getPort()), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), diff --git a/instrumentation/http-url-connection/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlNetAttributesGetter.java b/instrumentation/http-url-connection/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlNetAttributesGetter.java index 1f0bfebc2b25..746ffc3c93d4 100644 --- a/instrumentation/http-url-connection/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlNetAttributesGetter.java +++ b/instrumentation/http-url-connection/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlNetAttributesGetter.java @@ -6,18 +6,11 @@ package io.opentelemetry.javaagent.instrumentation.httpurlconnection; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.HttpURLConnection; import javax.annotation.Nullable; class HttpUrlNetAttributesGetter implements NetClientAttributesGetter { - @Override - @Nullable - public String getTransport(HttpURLConnection connection, @Nullable Integer status) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(HttpURLConnection connection, @Nullable Integer integer) { diff --git a/instrumentation/http-url-connection/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlConnectionTest.java b/instrumentation/http-url-connection/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlConnectionTest.java index 0b7712b31659..d09a4e0490cc 100644 --- a/instrumentation/http-url-connection/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlConnectionTest.java +++ b/instrumentation/http-url-connection/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/HttpUrlConnectionTest.java @@ -11,7 +11,6 @@ import static io.opentelemetry.javaagent.instrumentation.httpurlconnection.StreamUtils.readLines; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.satisfies; -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP; import static org.assertj.core.api.Assertions.assertThat; import io.opentelemetry.api.trace.Span; @@ -136,7 +135,6 @@ public void traceRequest(boolean useCache) throws IOException { .hasKind(CLIENT) .hasParent(trace.getSpan(0)) .hasAttributesSatisfyingExactly( - equalTo(SemanticAttributes.NET_TRANSPORT, IP_TCP), equalTo(stringKey("net.protocol.name"), "http"), equalTo(stringKey("net.protocol.version"), "1.1"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), @@ -154,7 +152,6 @@ public void traceRequest(boolean useCache) throws IOException { .hasKind(CLIENT) .hasParent(trace.getSpan(0)) .hasAttributesSatisfyingExactly( - equalTo(SemanticAttributes.NET_TRANSPORT, IP_TCP), equalTo(stringKey("net.protocol.name"), "http"), equalTo(stringKey("net.protocol.version"), "1.1"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), @@ -193,7 +190,6 @@ public void testBrokenApiUsage() throws IOException { .hasKind(CLIENT) .hasParent(trace.getSpan(0)) .hasAttributesSatisfyingExactly( - equalTo(SemanticAttributes.NET_TRANSPORT, IP_TCP), equalTo(stringKey("net.protocol.name"), "http"), equalTo(stringKey("net.protocol.version"), "1.1"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), @@ -245,7 +241,6 @@ public void testPostRequest() throws IOException { .hasKind(CLIENT) .hasParent(trace.getSpan(0)) .hasAttributesSatisfyingExactly( - equalTo(SemanticAttributes.NET_TRANSPORT, IP_TCP), equalTo(stringKey("net.protocol.name"), "http"), equalTo(stringKey("net.protocol.version"), "1.1"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), @@ -302,7 +297,6 @@ public void getOutputStreamShouldTransformGetIntoPost() throws IOException { .hasKind(CLIENT) .hasParent(trace.getSpan(0)) .hasAttributesSatisfyingExactly( - equalTo(SemanticAttributes.NET_TRANSPORT, IP_TCP), equalTo(stringKey("net.protocol.name"), "http"), equalTo(stringKey("net.protocol.version"), "1.1"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), diff --git a/instrumentation/http-url-connection/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/UrlConnectionTest.java b/instrumentation/http-url-connection/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/UrlConnectionTest.java index 1faab858efa3..7ec7d967be1f 100644 --- a/instrumentation/http-url-connection/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/UrlConnectionTest.java +++ b/instrumentation/http-url-connection/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/httpurlconnection/UrlConnectionTest.java @@ -9,7 +9,6 @@ import static io.opentelemetry.api.trace.SpanKind.CLIENT; import static io.opentelemetry.api.trace.SpanKind.INTERNAL; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo; -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.catchThrowable; @@ -65,7 +64,6 @@ public void traceRequestWithConnectionFailure(String scheme) { .hasStatus(StatusData.error()) .hasException(thrown) .hasAttributesSatisfyingExactly( - equalTo(SemanticAttributes.NET_TRANSPORT, IP_TCP), equalTo(stringKey("net.protocol.name"), "http"), equalTo(stringKey("net.protocol.version"), "1.1"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), diff --git a/instrumentation/java-http-client/library/src/main/java/io/opentelemetry/instrumentation/httpclient/internal/JavaHttpClientNetAttributesGetter.java b/instrumentation/java-http-client/library/src/main/java/io/opentelemetry/instrumentation/httpclient/internal/JavaHttpClientNetAttributesGetter.java index aadd09378c3f..230ffc7b5c18 100644 --- a/instrumentation/java-http-client/library/src/main/java/io/opentelemetry/instrumentation/httpclient/internal/JavaHttpClientNetAttributesGetter.java +++ b/instrumentation/java-http-client/library/src/main/java/io/opentelemetry/instrumentation/httpclient/internal/JavaHttpClientNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.httpclient.internal; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; @@ -19,11 +18,6 @@ public class JavaHttpClientNetAttributesGetter implements NetClientAttributesGetter> { - @Override - public String getTransport(HttpRequest request, @Nullable HttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(HttpRequest request, @Nullable HttpResponse response) { diff --git a/instrumentation/jaxrs-client/jaxrs-client-1.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v1_1/JaxRsClientNetAttributesGetter.java b/instrumentation/jaxrs-client/jaxrs-client-1.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v1_1/JaxRsClientNetAttributesGetter.java index 6c29adaead1a..68e3384388e8 100644 --- a/instrumentation/jaxrs-client/jaxrs-client-1.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v1_1/JaxRsClientNetAttributesGetter.java +++ b/instrumentation/jaxrs-client/jaxrs-client-1.1/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/v1_1/JaxRsClientNetAttributesGetter.java @@ -8,17 +8,11 @@ import com.sun.jersey.api.client.ClientRequest; import com.sun.jersey.api.client.ClientResponse; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; final class JaxRsClientNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(ClientRequest request, @Nullable ClientResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override @Nullable public String getPeerName(ClientRequest request) { diff --git a/instrumentation/jaxrs-client/jaxrs-client-2.0-testing/src/test/groovy/JaxRsClientTest.groovy b/instrumentation/jaxrs-client/jaxrs-client-2.0-testing/src/test/groovy/JaxRsClientTest.groovy index 893d1bf8a8ac..59c3e1c85b0d 100644 --- a/instrumentation/jaxrs-client/jaxrs-client-2.0-testing/src/test/groovy/JaxRsClientTest.groovy +++ b/instrumentation/jaxrs-client/jaxrs-client-2.0-testing/src/test/groovy/JaxRsClientTest.groovy @@ -26,7 +26,6 @@ import java.util.concurrent.TimeUnit import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.StatusCode.ERROR -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP abstract class JaxRsClientTest extends HttpClientTest implements AgentTestTrait { @@ -108,7 +107,6 @@ abstract class JaxRsClientTest extends HttpClientTest implem kind CLIENT status ERROR attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_PEER_NAME" uri.host diff --git a/instrumentation/jaxrs/jaxrs-common/testing/src/main/groovy/AbstractJaxRsHttpServerTest.groovy b/instrumentation/jaxrs/jaxrs-common/testing/src/main/groovy/AbstractJaxRsHttpServerTest.groovy index ae4dec4546ca..7c3b89cef6fa 100644 --- a/instrumentation/jaxrs/jaxrs-common/testing/src/main/groovy/AbstractJaxRsHttpServerTest.groovy +++ b/instrumentation/jaxrs/jaxrs-common/testing/src/main/groovy/AbstractJaxRsHttpServerTest.groovy @@ -19,7 +19,6 @@ import static io.opentelemetry.api.trace.StatusCode.ERROR import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.EXCEPTION import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.PATH_PARAM import static io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint.SUCCESS -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP import static java.util.concurrent.TimeUnit.SECONDS import static org.junit.jupiter.api.Assumptions.assumeTrue @@ -293,7 +292,6 @@ abstract class AbstractJaxRsHttpServerTest extends HttpServerTest implemen "$SemanticAttributes.HTTP_STATUS_CODE" statusCode "$SemanticAttributes.USER_AGENT_ORIGINAL" TEST_USER_AGENT "$SemanticAttributes.HTTP_CLIENT_IP" TEST_CLIENT_IP - "$SemanticAttributes.NET_TRANSPORT" IP_TCP // Optional "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" { it == null || it instanceof Long } "$SemanticAttributes.HTTP_ROUTE" path diff --git a/instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/internal/JdbcNetAttributesGetter.java b/instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/internal/JdbcNetAttributesGetter.java index 5261fd450bfe..e1ceaee6f142 100644 --- a/instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/internal/JdbcNetAttributesGetter.java +++ b/instrumentation/jdbc/library/src/main/java/io/opentelemetry/instrumentation/jdbc/internal/JdbcNetAttributesGetter.java @@ -14,12 +14,6 @@ */ public final class JdbcNetAttributesGetter implements NetClientAttributesGetter { - @Nullable - @Override - public String getTransport(DbRequest request, @Nullable Void unused) { - return null; - } - @Nullable @Override public String getPeerName(DbRequest request) { diff --git a/instrumentation/jedis/jedis-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v1_4/JedisNetAttributesGetter.java b/instrumentation/jedis/jedis-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v1_4/JedisNetAttributesGetter.java index aa2c478d2e95..a626b5ad5bda 100644 --- a/instrumentation/jedis/jedis-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v1_4/JedisNetAttributesGetter.java +++ b/instrumentation/jedis/jedis-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v1_4/JedisNetAttributesGetter.java @@ -6,16 +6,9 @@ package io.opentelemetry.javaagent.instrumentation.jedis.v1_4; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import javax.annotation.Nullable; final class JedisNetAttributesGetter implements NetClientAttributesGetter { - @Override - @Nullable - public String getTransport(JedisRequest request, @Nullable Void unused) { - return null; - } - @Override public String getPeerName(JedisRequest request) { return request.getConnection().getHost(); diff --git a/instrumentation/jedis/jedis-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/JedisNetAttributesGetter.java b/instrumentation/jedis/jedis-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/JedisNetAttributesGetter.java index 7ecf8007106c..0298ab594260 100644 --- a/instrumentation/jedis/jedis-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/JedisNetAttributesGetter.java +++ b/instrumentation/jedis/jedis-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/JedisNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.jedis.v3_0; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import java.net.Socket; import javax.annotation.Nullable; @@ -14,11 +13,6 @@ final class JedisNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - public String getTransport(JedisRequest jedisRequest, @Nullable Void unused) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getPeerName(JedisRequest jedisRequest) { diff --git a/instrumentation/jedis/jedis-3.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/Jedis30ClientTest.java b/instrumentation/jedis/jedis-3.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/Jedis30ClientTest.java index 09950edc43f5..041cd17c2fcf 100644 --- a/instrumentation/jedis/jedis-3.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/Jedis30ClientTest.java +++ b/instrumentation/jedis/jedis-3.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jedis/v3_0/Jedis30ClientTest.java @@ -66,10 +66,7 @@ void setCommand() { equalTo(SemanticAttributes.DB_OPERATION, "SET"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), equalTo(SemanticAttributes.NET_PEER_PORT, port), - equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP)))); + equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1")))); } @Test @@ -91,10 +88,7 @@ void getCommand() { equalTo(SemanticAttributes.DB_OPERATION, "SET"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), equalTo(SemanticAttributes.NET_PEER_PORT, port), - equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP))), + equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"))), trace -> trace.hasSpansSatisfyingExactly( span -> @@ -106,10 +100,7 @@ void getCommand() { equalTo(SemanticAttributes.DB_OPERATION, "GET"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), equalTo(SemanticAttributes.NET_PEER_PORT, port), - equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP)))); + equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1")))); } @Test @@ -131,10 +122,7 @@ void commandWithNoArguments() { equalTo(SemanticAttributes.DB_OPERATION, "SET"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), equalTo(SemanticAttributes.NET_PEER_PORT, port), - equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP))), + equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"))), trace -> trace.hasSpansSatisfyingExactly( span -> @@ -146,9 +134,6 @@ void commandWithNoArguments() { equalTo(SemanticAttributes.DB_OPERATION, "RANDOMKEY"), equalTo(SemanticAttributes.NET_PEER_NAME, "localhost"), equalTo(SemanticAttributes.NET_PEER_PORT, port), - equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP)))); + equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1")))); } } diff --git a/instrumentation/jedis/jedis-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v4_0/JedisNetAttributesGetter.java b/instrumentation/jedis/jedis-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v4_0/JedisNetAttributesGetter.java index fbe9b2216a4f..4ab7c63537e5 100644 --- a/instrumentation/jedis/jedis-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v4_0/JedisNetAttributesGetter.java +++ b/instrumentation/jedis/jedis-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jedis/v4_0/JedisNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.jedis.v4_0; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import java.net.SocketAddress; import javax.annotation.Nullable; @@ -14,11 +13,6 @@ final class JedisNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - public String getTransport(JedisRequest jedisRequest, @Nullable Void unused) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getPeerName(JedisRequest jedisRequest) { diff --git a/instrumentation/jedis/jedis-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jedis/v4_0/Jedis40ClientTest.java b/instrumentation/jedis/jedis-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jedis/v4_0/Jedis40ClientTest.java index 74e7077f1a13..7cc5c8e0e967 100644 --- a/instrumentation/jedis/jedis-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jedis/v4_0/Jedis40ClientTest.java +++ b/instrumentation/jedis/jedis-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jedis/v4_0/Jedis40ClientTest.java @@ -65,9 +65,6 @@ void setCommand() { equalTo(SemanticAttributes.DB_SYSTEM, "redis"), equalTo(SemanticAttributes.DB_STATEMENT, "SET foo ?"), equalTo(SemanticAttributes.DB_OPERATION, "SET"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_SOCK_PEER_PORT, port), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), satisfies( @@ -92,9 +89,6 @@ void getCommand() { equalTo(SemanticAttributes.DB_SYSTEM, "redis"), equalTo(SemanticAttributes.DB_STATEMENT, "SET foo ?"), equalTo(SemanticAttributes.DB_OPERATION, "SET"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_SOCK_PEER_PORT, port), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), satisfies( @@ -109,9 +103,6 @@ void getCommand() { equalTo(SemanticAttributes.DB_SYSTEM, "redis"), equalTo(SemanticAttributes.DB_STATEMENT, "GET foo"), equalTo(SemanticAttributes.DB_OPERATION, "GET"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_SOCK_PEER_PORT, port), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), satisfies( @@ -136,9 +127,6 @@ void commandWithNoArguments() { equalTo(SemanticAttributes.DB_SYSTEM, "redis"), equalTo(SemanticAttributes.DB_STATEMENT, "SET foo ?"), equalTo(SemanticAttributes.DB_OPERATION, "SET"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_SOCK_PEER_PORT, port), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), satisfies( @@ -153,9 +141,6 @@ void commandWithNoArguments() { equalTo(SemanticAttributes.DB_SYSTEM, "redis"), equalTo(SemanticAttributes.DB_STATEMENT, "RANDOMKEY"), equalTo(SemanticAttributes.DB_OPERATION, "RANDOMKEY"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(SemanticAttributes.NET_SOCK_PEER_PORT, port), equalTo(SemanticAttributes.NET_SOCK_PEER_ADDR, "127.0.0.1"), satisfies( diff --git a/instrumentation/jetty-httpclient/jetty-httpclient-9.2/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v9_2/internal/JettyHttpClientNetAttributesGetter.java b/instrumentation/jetty-httpclient/jetty-httpclient-9.2/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v9_2/internal/JettyHttpClientNetAttributesGetter.java index 23994b2f9d7c..b792a7c606d0 100644 --- a/instrumentation/jetty-httpclient/jetty-httpclient-9.2/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v9_2/internal/JettyHttpClientNetAttributesGetter.java +++ b/instrumentation/jetty-httpclient/jetty-httpclient-9.2/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v9_2/internal/JettyHttpClientNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.jetty.httpclient.v9_2.internal; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import org.eclipse.jetty.client.api.Request; import org.eclipse.jetty.client.api.Response; @@ -19,11 +18,6 @@ public class JettyHttpClientNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(Request request, @Nullable Response response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(Request request, @Nullable Response response) { diff --git a/instrumentation/jodd-http-4.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/joddhttp/v4_2/JoddHttpNetAttributesGetter.java b/instrumentation/jodd-http-4.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/joddhttp/v4_2/JoddHttpNetAttributesGetter.java index 398adea5771e..9f7b7536d194 100644 --- a/instrumentation/jodd-http-4.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/joddhttp/v4_2/JoddHttpNetAttributesGetter.java +++ b/instrumentation/jodd-http-4.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/joddhttp/v4_2/JoddHttpNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.joddhttp.v4_2; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import jodd.http.HttpRequest; import jodd.http.HttpResponse; @@ -14,11 +13,6 @@ final class JoddHttpNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(HttpRequest request, @Nullable HttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getProtocolName(HttpRequest request, @Nullable HttpResponse response) { return "http"; diff --git a/instrumentation/jsf/jsf-jakarta-common/testing/src/main/groovy/BaseJsfTest.groovy b/instrumentation/jsf/jsf-jakarta-common/testing/src/main/groovy/BaseJsfTest.groovy index 07c8fa3c95ea..dd5a67b6b372 100644 --- a/instrumentation/jsf/jsf-jakarta-common/testing/src/main/groovy/BaseJsfTest.groovy +++ b/instrumentation/jsf/jsf-jakarta-common/testing/src/main/groovy/BaseJsfTest.groovy @@ -86,7 +86,6 @@ abstract class BaseJsfTest extends AgentInstrumentationSpecification implements kind SpanKind.SERVER hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" diff --git a/instrumentation/jsf/jsf-javax-common/testing/src/main/groovy/BaseJsfTest.groovy b/instrumentation/jsf/jsf-javax-common/testing/src/main/groovy/BaseJsfTest.groovy index 0f728c3ad901..d78ea5cb5c63 100644 --- a/instrumentation/jsf/jsf-javax-common/testing/src/main/groovy/BaseJsfTest.groovy +++ b/instrumentation/jsf/jsf-javax-common/testing/src/main/groovy/BaseJsfTest.groovy @@ -97,7 +97,6 @@ abstract class BaseJsfTest extends AgentInstrumentationSpecification implements kind SpanKind.SERVER hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" diff --git a/instrumentation/jsp-2.3/javaagent/src/test/groovy/JspInstrumentationBasicTests.groovy b/instrumentation/jsp-2.3/javaagent/src/test/groovy/JspInstrumentationBasicTests.groovy index 690ca0f8c321..3f479c193b6f 100644 --- a/instrumentation/jsp-2.3/javaagent/src/test/groovy/JspInstrumentationBasicTests.groovy +++ b/instrumentation/jsp-2.3/javaagent/src/test/groovy/JspInstrumentationBasicTests.groovy @@ -21,7 +21,6 @@ import java.nio.file.Files import static io.opentelemetry.api.trace.SpanKind.SERVER import static io.opentelemetry.api.trace.StatusCode.ERROR -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP //TODO should this be HttpServerTest? class JspInstrumentationBasicTests extends AgentInstrumentationSpecification { @@ -97,7 +96,6 @@ class JspInstrumentationBasicTests extends AgentInstrumentationSpecification { "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH" { it == null || it instanceof Long } "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -156,7 +154,6 @@ class JspInstrumentationBasicTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 200 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -212,7 +209,6 @@ class JspInstrumentationBasicTests extends AgentInstrumentationSpecification { "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH" Long "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -276,7 +272,6 @@ class JspInstrumentationBasicTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 500 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -345,7 +340,6 @@ class JspInstrumentationBasicTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 200 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -395,7 +389,6 @@ class JspInstrumentationBasicTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 200 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -477,7 +470,6 @@ class JspInstrumentationBasicTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 500 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -528,7 +520,6 @@ class JspInstrumentationBasicTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 200 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" diff --git a/instrumentation/jsp-2.3/javaagent/src/test/groovy/JspInstrumentationForwardTests.groovy b/instrumentation/jsp-2.3/javaagent/src/test/groovy/JspInstrumentationForwardTests.groovy index 9e1dc456335d..87d23596db01 100644 --- a/instrumentation/jsp-2.3/javaagent/src/test/groovy/JspInstrumentationForwardTests.groovy +++ b/instrumentation/jsp-2.3/javaagent/src/test/groovy/JspInstrumentationForwardTests.groovy @@ -19,7 +19,6 @@ import java.nio.file.Files import static io.opentelemetry.api.trace.SpanKind.SERVER import static io.opentelemetry.api.trace.StatusCode.ERROR import static io.opentelemetry.api.trace.StatusCode.UNSET -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP class JspInstrumentationForwardTests extends AgentInstrumentationSpecification { @@ -94,7 +93,6 @@ class JspInstrumentationForwardTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 200 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -165,7 +163,6 @@ class JspInstrumentationForwardTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 200 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -215,7 +212,6 @@ class JspInstrumentationForwardTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 200 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -313,7 +309,6 @@ class JspInstrumentationForwardTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 200 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -397,7 +392,6 @@ class JspInstrumentationForwardTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 500 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" @@ -460,7 +454,6 @@ class JspInstrumentationForwardTests extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_STATUS_CODE" 404 "$SemanticAttributes.USER_AGENT_ORIGINAL" String "$SemanticAttributes.HTTP_ROUTE" route - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" "localhost" diff --git a/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorNetServerAttributesGetter.kt b/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorNetServerAttributesGetter.kt index 73a9a4534389..7f35085363c8 100644 --- a/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorNetServerAttributesGetter.kt +++ b/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorNetServerAttributesGetter.kt @@ -8,12 +8,8 @@ package io.opentelemetry.instrumentation.ktor.v1_0 import io.ktor.request.* import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter import io.opentelemetry.instrumentation.ktor.isIpAddress -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes internal class KtorNetServerAttributesGetter : NetServerAttributesGetter { - override fun getTransport(request: ApplicationRequest): String { - return SemanticAttributes.NetTransportValues.IP_TCP - } override fun getProtocolName(request: ApplicationRequest): String? = if (request.httpVersion.startsWith("HTTP/")) "http" else null diff --git a/instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/client/KtorNetClientAttributesGetter.kt b/instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/client/KtorNetClientAttributesGetter.kt index ddd4fa235eb0..716abcae768f 100644 --- a/instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/client/KtorNetClientAttributesGetter.kt +++ b/instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/client/KtorNetClientAttributesGetter.kt @@ -8,12 +8,9 @@ package io.opentelemetry.instrumentation.ktor.v2_0.client import io.ktor.client.request.* import io.ktor.client.statement.* import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP internal object KtorNetClientAttributesGetter : NetClientAttributesGetter { - override fun getTransport(request: HttpRequestData, response: HttpResponse?) = IP_TCP - override fun getProtocolName(request: HttpRequestData?, response: HttpResponse?): String? = response?.version?.name diff --git a/instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/server/KtorNetServerAttributesGetter.kt b/instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/server/KtorNetServerAttributesGetter.kt index c9e14784bb74..2530ba867d28 100644 --- a/instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/server/KtorNetServerAttributesGetter.kt +++ b/instrumentation/ktor/ktor-2.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/server/KtorNetServerAttributesGetter.kt @@ -8,12 +8,8 @@ package io.opentelemetry.instrumentation.ktor.v2_0.server import io.ktor.server.request.* import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter import io.opentelemetry.instrumentation.ktor.isIpAddress -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes internal class KtorNetServerAttributesGetter : NetServerAttributesGetter { - override fun getTransport(request: ApplicationRequest): String { - return SemanticAttributes.NetTransportValues.IP_TCP - } override fun getProtocolName(request: ApplicationRequest): String? = if (request.httpVersion.startsWith("HTTP/")) "http" else null diff --git a/instrumentation/kubernetes-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/kubernetesclient/KubernetesNetAttributesGetter.java b/instrumentation/kubernetes-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/kubernetesclient/KubernetesNetAttributesGetter.java index 6deb533b4a8e..d3a9b79e9c66 100644 --- a/instrumentation/kubernetes-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/kubernetesclient/KubernetesNetAttributesGetter.java +++ b/instrumentation/kubernetes-client-7.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/kubernetesclient/KubernetesNetAttributesGetter.java @@ -7,17 +7,10 @@ import io.kubernetes.client.openapi.ApiResponse; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; -import javax.annotation.Nullable; import okhttp3.Request; class KubernetesNetAttributesGetter implements NetClientAttributesGetter> { - @Override - public String getTransport(Request request, @Nullable ApiResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getPeerName(Request request) { return request.url().host(); diff --git a/instrumentation/kubernetes-client-7.0/javaagent/src/test/groovy/KubernetesClientTest.groovy b/instrumentation/kubernetes-client-7.0/javaagent/src/test/groovy/KubernetesClientTest.groovy index cf323ffd92cb..67da3165a26d 100644 --- a/instrumentation/kubernetes-client-7.0/javaagent/src/test/groovy/KubernetesClientTest.groovy +++ b/instrumentation/kubernetes-client-7.0/javaagent/src/test/groovy/KubernetesClientTest.groovy @@ -22,7 +22,6 @@ import java.util.concurrent.atomic.AtomicReference import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.StatusCode.ERROR -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP class KubernetesClientTest extends AgentInstrumentationSpecification { private static final String TEST_USER_AGENT = "test-user-agent" @@ -198,7 +197,6 @@ class KubernetesClientTest extends AgentInstrumentationSpecification { "$SemanticAttributes.HTTP_METHOD" "GET" "$SemanticAttributes.USER_AGENT_ORIGINAL" TEST_USER_AGENT "$SemanticAttributes.HTTP_STATUS_CODE" statusCode - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_PEER_NAME" "127.0.0.1" "$SemanticAttributes.NET_PEER_PORT" server.httpPort() "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" Long diff --git a/instrumentation/lettuce/lettuce-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceConnectNetAttributesGetter.java b/instrumentation/lettuce/lettuce-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceConnectNetAttributesGetter.java index 35bcc05eb448..74886bb2d5d4 100644 --- a/instrumentation/lettuce/lettuce-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceConnectNetAttributesGetter.java +++ b/instrumentation/lettuce/lettuce-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v4_0/LettuceConnectNetAttributesGetter.java @@ -7,16 +7,9 @@ import com.lambdaworks.redis.RedisURI; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import javax.annotation.Nullable; final class LettuceConnectNetAttributesGetter implements NetClientAttributesGetter { - @Override - @Nullable - public String getTransport(RedisURI redisUri, @Nullable Void unused) { - return null; - } - @Override public String getPeerName(RedisURI redisUri) { return redisUri.getHost(); diff --git a/instrumentation/lettuce/lettuce-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v5_0/LettuceConnectNetAttributesGetter.java b/instrumentation/lettuce/lettuce-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v5_0/LettuceConnectNetAttributesGetter.java index db5dcba5a164..96b1d640a874 100644 --- a/instrumentation/lettuce/lettuce-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v5_0/LettuceConnectNetAttributesGetter.java +++ b/instrumentation/lettuce/lettuce-5.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/lettuce/v5_0/LettuceConnectNetAttributesGetter.java @@ -7,16 +7,9 @@ import io.lettuce.core.RedisURI; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import javax.annotation.Nullable; final class LettuceConnectNetAttributesGetter implements NetClientAttributesGetter { - @Override - @Nullable - public String getTransport(RedisURI redisUri, @Nullable Void unused) { - return null; - } - @Override public String getPeerName(RedisURI redisUri) { return redisUri.getHost(); diff --git a/instrumentation/lettuce/lettuce-5.1/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/lettuce/v5_1/LettuceReactiveClientTest.groovy b/instrumentation/lettuce/lettuce-5.1/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/lettuce/v5_1/LettuceReactiveClientTest.groovy index 827ff5361147..34325b19483a 100644 --- a/instrumentation/lettuce/lettuce-5.1/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/lettuce/v5_1/LettuceReactiveClientTest.groovy +++ b/instrumentation/lettuce/lettuce-5.1/javaagent/src/test/groovy/io/opentelemetry/javaagent/instrumentation/lettuce/v5_1/LettuceReactiveClientTest.groovy @@ -12,8 +12,6 @@ import io.opentelemetry.instrumentation.test.AgentTestTrait import io.opentelemetry.semconv.trace.attributes.SemanticAttributes import reactor.core.scheduler.Schedulers -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP - class LettuceReactiveClientTest extends AbstractLettuceReactiveClientTest implements AgentTestTrait { @Override RedisClient createClient(String uri) { @@ -44,7 +42,6 @@ class LettuceReactiveClientTest extends AbstractLettuceReactiveClientTest implem kind SpanKind.CLIENT childOf span(0) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -63,7 +60,6 @@ class LettuceReactiveClientTest extends AbstractLettuceReactiveClientTest implem kind SpanKind.CLIENT childOf span(0) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port diff --git a/instrumentation/lettuce/lettuce-5.1/library/src/main/java/io/opentelemetry/instrumentation/lettuce/v5_1/LettuceNetAttributesGetter.java b/instrumentation/lettuce/lettuce-5.1/library/src/main/java/io/opentelemetry/instrumentation/lettuce/v5_1/LettuceNetAttributesGetter.java index e1f91bfeec2f..1d2e87fda48b 100644 --- a/instrumentation/lettuce/lettuce-5.1/library/src/main/java/io/opentelemetry/instrumentation/lettuce/v5_1/LettuceNetAttributesGetter.java +++ b/instrumentation/lettuce/lettuce-5.1/library/src/main/java/io/opentelemetry/instrumentation/lettuce/v5_1/LettuceNetAttributesGetter.java @@ -5,8 +5,6 @@ package io.opentelemetry.instrumentation.lettuce.v5_1; -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP; - import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; import io.opentelemetry.instrumentation.lettuce.v5_1.OpenTelemetryTracing.OpenTelemetryEndpoint; import java.net.InetSocketAddress; @@ -15,11 +13,6 @@ final class LettuceNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - public String getTransport(OpenTelemetryEndpoint endpoint, @Nullable Void unused) { - return IP_TCP; - } - @Nullable @Override public String getPeerName(OpenTelemetryEndpoint openTelemetryEndpoint) { diff --git a/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceAsyncClientTest.groovy b/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceAsyncClientTest.groovy index 48e5f750e305..0cc86d33efdb 100644 --- a/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceAsyncClientTest.groovy +++ b/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceAsyncClientTest.groovy @@ -29,7 +29,6 @@ import java.util.function.Function import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.SpanKind.INTERNAL -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecification { public static final int DB_INDEX = 0 @@ -159,7 +158,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati name "SET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -210,7 +208,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati name "GET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -285,7 +282,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati kind CLIENT childOf(span(0)) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -349,7 +345,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati kind CLIENT childOf(span(0)) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -416,7 +411,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati name "HMSET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -436,7 +430,6 @@ abstract class AbstractLettuceAsyncClientTest extends InstrumentationSpecificati name "HGETALL" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port diff --git a/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceReactiveClientTest.groovy b/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceReactiveClientTest.groovy index 8fae19f62c53..5f3e84915ff1 100644 --- a/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceReactiveClientTest.groovy +++ b/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceReactiveClientTest.groovy @@ -19,7 +19,6 @@ import java.util.function.Consumer import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.SpanKind.INTERNAL -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecification { public static final int DB_INDEX = 0 @@ -101,7 +100,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific kind CLIENT childOf(span(0)) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -139,7 +137,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific name "GET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -190,7 +187,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific kind CLIENT childOf(span(0)) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -234,7 +230,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific name "RANDOMKEY" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -263,7 +258,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific name "COMMAND" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -311,7 +305,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific kind CLIENT childOf span(0) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -330,7 +323,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific kind CLIENT childOf span(0) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -369,7 +361,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific kind CLIENT childOf span(0) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -388,7 +379,6 @@ abstract class AbstractLettuceReactiveClientTest extends InstrumentationSpecific kind CLIENT childOf span(0) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port diff --git a/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientAuthTest.groovy b/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientAuthTest.groovy index 3251ce57e25a..b0da937f24b2 100644 --- a/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientAuthTest.groovy +++ b/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientAuthTest.groovy @@ -12,7 +12,6 @@ import org.testcontainers.containers.GenericContainer import spock.lang.Shared import static io.opentelemetry.api.trace.SpanKind.CLIENT -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP abstract class AbstractLettuceSyncClientAuthTest extends InstrumentationSpecification { public static final int DB_INDEX = 0 @@ -67,7 +66,6 @@ abstract class AbstractLettuceSyncClientAuthTest extends InstrumentationSpecific name "AUTH" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port diff --git a/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientTest.groovy b/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientTest.groovy index e7dcc1cdbbc2..98ead1521875 100644 --- a/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientTest.groovy +++ b/instrumentation/lettuce/lettuce-5.1/testing/src/main/groovy/io/opentelemetry/instrumentation/lettuce/v5_1/AbstractLettuceSyncClientTest.groovy @@ -19,7 +19,6 @@ import spock.lang.Shared import static io.opentelemetry.api.trace.SpanKind.CLIENT import static io.opentelemetry.api.trace.StatusCode.ERROR -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP import static java.nio.charset.StandardCharsets.UTF_8 abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecification { @@ -123,7 +122,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "SET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -156,7 +154,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "SET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -190,7 +187,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "GET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -220,7 +216,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "GET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -250,7 +245,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "RANDOMKEY" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -280,7 +274,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "LPUSH" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -310,7 +303,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "HMSET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -340,7 +332,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "HGETALL" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -375,7 +366,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "EVAL" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -409,7 +399,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio name "MSET" kind CLIENT attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -439,7 +428,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio kind CLIENT // Disconnect not an actual error even though an exception is recorded. attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port @@ -475,7 +463,6 @@ abstract class AbstractLettuceSyncClientTest extends InstrumentationSpecificatio status ERROR } attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" "$SemanticAttributes.NET_SOCK_PEER_NAME" expectedHostAttributeValue "$SemanticAttributes.NET_SOCK_PEER_PORT" port diff --git a/instrumentation/liberty/liberty-dispatcher-20.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/liberty/dispatcher/LibertyDispatcherNetAttributesGetter.java b/instrumentation/liberty/liberty-dispatcher-20.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/liberty/dispatcher/LibertyDispatcherNetAttributesGetter.java index 79729250850c..1968ffdb24df 100644 --- a/instrumentation/liberty/liberty-dispatcher-20.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/liberty/dispatcher/LibertyDispatcherNetAttributesGetter.java +++ b/instrumentation/liberty/liberty-dispatcher-20.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/liberty/dispatcher/LibertyDispatcherNetAttributesGetter.java @@ -6,17 +6,11 @@ package io.opentelemetry.javaagent.instrumentation.liberty.dispatcher; import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; public class LibertyDispatcherNetAttributesGetter implements NetServerAttributesGetter { - @Override - public String getTransport(LibertyRequest request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(LibertyRequest request) { diff --git a/instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1/MongoNetAttributesGetter.java b/instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1/MongoNetAttributesGetter.java index 3801fd2679b1..6a81e1d1feb5 100644 --- a/instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1/MongoNetAttributesGetter.java +++ b/instrumentation/mongo/mongo-3.1/library/src/main/java/io/opentelemetry/instrumentation/mongo/v3_1/MongoNetAttributesGetter.java @@ -11,12 +11,6 @@ class MongoNetAttributesGetter implements NetClientAttributesGetter { - @Override - @Nullable - public String getTransport(CommandStartedEvent event, @Nullable Void unused) { - return null; - } - @Nullable @Override public String getPeerName(CommandStartedEvent event) { diff --git a/instrumentation/okhttp/okhttp-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/okhttp/v2_2/OkHttp2NetAttributesGetter.java b/instrumentation/okhttp/okhttp-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/okhttp/v2_2/OkHttp2NetAttributesGetter.java index 0329a7e18db5..7fe7c6b8df67 100644 --- a/instrumentation/okhttp/okhttp-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/okhttp/v2_2/OkHttp2NetAttributesGetter.java +++ b/instrumentation/okhttp/okhttp-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/okhttp/v2_2/OkHttp2NetAttributesGetter.java @@ -8,17 +8,11 @@ import com.squareup.okhttp.Request; import com.squareup.okhttp.Response; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; public final class OkHttp2NetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(Request request, @Nullable Response response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(Request request, @Nullable Response response) { diff --git a/instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/internal/OkHttpNetAttributesGetter.java b/instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/internal/OkHttpNetAttributesGetter.java index e8982a35ea55..2eff8026abc8 100644 --- a/instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/internal/OkHttpNetAttributesGetter.java +++ b/instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/internal/OkHttpNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.okhttp.v3_0.internal; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import okhttp3.Request; import okhttp3.Response; @@ -18,11 +17,6 @@ public final class OkHttpNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(Request request, @Nullable Response response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(Request request, @Nullable Response response) { diff --git a/instrumentation/opensearch/opensearch-rest-1.0/javaagent/src/test/java/OpenSearchRestTest.java b/instrumentation/opensearch/opensearch-rest-1.0/javaagent/src/test/java/OpenSearchRestTest.java index ed0d36c9e342..2d758380588c 100644 --- a/instrumentation/opensearch/opensearch-rest-1.0/javaagent/src/test/java/OpenSearchRestTest.java +++ b/instrumentation/opensearch/opensearch-rest-1.0/javaagent/src/test/java/OpenSearchRestTest.java @@ -92,18 +92,12 @@ void shouldGetStatusWithTraces() throws IOException { .hasAttributesSatisfyingExactly( equalTo(SemanticAttributes.DB_SYSTEM, "opensearch"), equalTo(SemanticAttributes.DB_OPERATION, "GET"), - equalTo(SemanticAttributes.DB_STATEMENT, "GET _cluster/health"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP)), + equalTo(SemanticAttributes.DB_STATEMENT, "GET _cluster/health")), span -> span.hasName("GET") .hasKind(SpanKind.CLIENT) .hasParent(trace.getSpan(0)) .hasAttributesSatisfyingExactly( - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(stringKey("net.protocol.name"), "http"), equalTo(stringKey("net.protocol.version"), "1.1"), equalTo(SemanticAttributes.NET_PEER_NAME, httpHost.getHostName()), @@ -166,18 +160,12 @@ public void onFailure(Exception e) { .hasAttributesSatisfyingExactly( equalTo(SemanticAttributes.DB_SYSTEM, "opensearch"), equalTo(SemanticAttributes.DB_OPERATION, "GET"), - equalTo(SemanticAttributes.DB_STATEMENT, "GET _cluster/health"), - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP)), + equalTo(SemanticAttributes.DB_STATEMENT, "GET _cluster/health")), span -> span.hasName("GET") .hasKind(SpanKind.CLIENT) .hasParent(trace.getSpan(1)) .hasAttributesSatisfyingExactly( - equalTo( - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NetTransportValues.IP_TCP), equalTo(stringKey("net.protocol.name"), "http"), equalTo(stringKey("net.protocol.version"), "1.1"), equalTo(SemanticAttributes.NET_PEER_NAME, httpHost.getHostName()), diff --git a/instrumentation/opensearch/opensearch-rest-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/opensearch/rest/OpenSearchRestNetResponseAttributesGetter.java b/instrumentation/opensearch/opensearch-rest-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/opensearch/rest/OpenSearchRestNetResponseAttributesGetter.java index 02695fe3854c..883f6d761223 100644 --- a/instrumentation/opensearch/opensearch-rest-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/opensearch/rest/OpenSearchRestNetResponseAttributesGetter.java +++ b/instrumentation/opensearch/opensearch-rest-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/opensearch/rest/OpenSearchRestNetResponseAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.opensearch.rest; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.Inet6Address; import javax.annotation.Nullable; import org.opensearch.client.Response; @@ -14,11 +13,6 @@ final class OpenSearchRestNetResponseAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(OpenSearchRestRequest request, Response response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override @Nullable public String getPeerName(OpenSearchRestRequest request) { diff --git a/instrumentation/opentelemetry-instrumentation-api/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/testing/MockNetServerAttributesGetter.java b/instrumentation/opentelemetry-instrumentation-api/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/testing/MockNetServerAttributesGetter.java index d473e53b5561..6d86c24d5eb1 100644 --- a/instrumentation/opentelemetry-instrumentation-api/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/testing/MockNetServerAttributesGetter.java +++ b/instrumentation/opentelemetry-instrumentation-api/testing/src/main/java/io/opentelemetry/javaagent/instrumentation/testing/MockNetServerAttributesGetter.java @@ -12,12 +12,6 @@ enum MockNetServerAttributesGetter implements NetServerAttributesGetter { INSTANCE; - @Nullable - @Override - public String getTransport(String s) { - return null; - } - @Nullable @Override public String getHostName(String s) { diff --git a/instrumentation/play/play-ws/play-ws-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/playws/PlayWsClientNetAttributesGetter.java b/instrumentation/play/play-ws/play-ws-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/playws/PlayWsClientNetAttributesGetter.java index eff748c09b94..99a62e10299e 100644 --- a/instrumentation/play/play-ws/play-ws-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/playws/PlayWsClientNetAttributesGetter.java +++ b/instrumentation/play/play-ws/play-ws-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/playws/PlayWsClientNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.playws; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import javax.annotation.Nullable; import play.shaded.ahc.org.asynchttpclient.Request; @@ -15,11 +14,6 @@ final class PlayWsClientNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Override - public String getTransport(Request request, @Nullable Response response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getPeerName(Request request) { diff --git a/instrumentation/r2dbc-1.0/library/src/main/java/io/opentelemetry/instrumentation/r2dbc/v1_0/internal/R2dbcNetAttributesGetter.java b/instrumentation/r2dbc-1.0/library/src/main/java/io/opentelemetry/instrumentation/r2dbc/v1_0/internal/R2dbcNetAttributesGetter.java index 9b8cfe2e6f6b..7f00359edf46 100644 --- a/instrumentation/r2dbc-1.0/library/src/main/java/io/opentelemetry/instrumentation/r2dbc/v1_0/internal/R2dbcNetAttributesGetter.java +++ b/instrumentation/r2dbc-1.0/library/src/main/java/io/opentelemetry/instrumentation/r2dbc/v1_0/internal/R2dbcNetAttributesGetter.java @@ -15,12 +15,6 @@ public enum R2dbcNetAttributesGetter implements NetClientAttributesGetter { INSTANCE; - @Nullable - @Override - public String getTransport(DbExecution request, @Nullable Void unused) { - return null; - } - @Nullable @Override public String getPeerName(DbExecution request) { diff --git a/instrumentation/rabbitmq-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitChannelNetAttributesGetter.java b/instrumentation/rabbitmq-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitChannelNetAttributesGetter.java index ee1f9cf1cac6..01c6aa1f0d78 100644 --- a/instrumentation/rabbitmq-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitChannelNetAttributesGetter.java +++ b/instrumentation/rabbitmq-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitChannelNetAttributesGetter.java @@ -12,12 +12,6 @@ public class RabbitChannelNetAttributesGetter implements NetClientAttributesGetter { - @Nullable - @Override - public String getTransport(ChannelAndMethod channelAndMethod, @Nullable Void unused) { - return null; - } - @Nullable @Override public String getPeerName(ChannelAndMethod channelAndMethod) { diff --git a/instrumentation/rabbitmq-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitReceiveNetAttributesGetter.java b/instrumentation/rabbitmq-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitReceiveNetAttributesGetter.java index 057674cc1d18..bbff4f768811 100644 --- a/instrumentation/rabbitmq-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitReceiveNetAttributesGetter.java +++ b/instrumentation/rabbitmq-2.7/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/rabbitmq/RabbitReceiveNetAttributesGetter.java @@ -13,12 +13,6 @@ public class RabbitReceiveNetAttributesGetter implements NetClientAttributesGetter { - @Nullable - @Override - public String getTransport(ReceiveRequest request, @Nullable GetResponse response) { - return null; - } - @Nullable @Override public String getPeerName(ReceiveRequest request) { diff --git a/instrumentation/ratpack/ratpack-1.4/testing/src/main/groovy/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackRoutesTest.groovy b/instrumentation/ratpack/ratpack-1.4/testing/src/main/groovy/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackRoutesTest.groovy index 4fcc94a0aadc..050b6fe1ad93 100644 --- a/instrumentation/ratpack/ratpack-1.4/testing/src/main/groovy/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackRoutesTest.groovy +++ b/instrumentation/ratpack/ratpack-1.4/testing/src/main/groovy/io/opentelemetry/instrumentation/ratpack/server/AbstractRatpackRoutesTest.groovy @@ -95,7 +95,7 @@ abstract class AbstractRatpackRoutesTest extends InstrumentationSpecification { kind SERVER hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP + "$SemanticAttributes.NET_TRANSPORT" {it == null || it == IP_TCP } "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" { it == "localhost" || it == null } diff --git a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/internal/RatpackNetClientAttributesGetter.java b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/internal/RatpackNetClientAttributesGetter.java index c9c7e854a33c..a88d3362f749 100644 --- a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/internal/RatpackNetClientAttributesGetter.java +++ b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/internal/RatpackNetClientAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.ratpack.v1_7.internal; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import ratpack.http.client.HttpResponse; import ratpack.http.client.RequestSpec; @@ -18,11 +17,6 @@ public final class RatpackNetClientAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(RequestSpec request, @Nullable HttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override @Nullable public String getPeerName(RequestSpec request) { diff --git a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/internal/RatpackNetServerAttributesGetter.java b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/internal/RatpackNetServerAttributesGetter.java index 541701846a1c..cb371cc9a356 100644 --- a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/internal/RatpackNetServerAttributesGetter.java +++ b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/internal/RatpackNetServerAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.ratpack.v1_7.internal; import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import ratpack.handling.Context; import ratpack.http.Request; @@ -17,10 +16,6 @@ * any time. */ public final class RatpackNetServerAttributesGetter implements NetServerAttributesGetter { - @Override - public String getTransport(Request request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } @Nullable @Override diff --git a/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/ReactorNettyNetClientAttributesGetter.java b/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/ReactorNettyNetClientAttributesGetter.java index c3037193dfef..79ee55de86e8 100644 --- a/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/ReactorNettyNetClientAttributesGetter.java +++ b/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/ReactorNettyNetClientAttributesGetter.java @@ -17,12 +17,6 @@ final class ReactorNettyNetClientAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Nullable - @Override - public String getTransport(HttpClientConfig request, @Nullable HttpClientResponse response) { - return null; - } - @Nullable @Override public String getProtocolName(HttpClientConfig request, @Nullable HttpClientResponse response) { diff --git a/instrumentation/redisson/redisson-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/redisson/RedissonNetAttributesGetter.java b/instrumentation/redisson/redisson-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/redisson/RedissonNetAttributesGetter.java index dbf8a4d96fb1..333a846ecefd 100644 --- a/instrumentation/redisson/redisson-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/redisson/RedissonNetAttributesGetter.java +++ b/instrumentation/redisson/redisson-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/redisson/RedissonNetAttributesGetter.java @@ -12,12 +12,6 @@ final class RedissonNetAttributesGetter extends InetSocketAddressNetClientAttributesGetter { - @Nullable - @Override - public String getTransport(RedissonRequest request, @Nullable Void unused) { - return null; - } - @Nullable @Override public String getPeerName(RedissonRequest redissonRequest) { diff --git a/instrumentation/restlet/restlet-1.1/library/src/main/java/io/opentelemetry/instrumentation/restlet/v1_1/RestletNetAttributesGetter.java b/instrumentation/restlet/restlet-1.1/library/src/main/java/io/opentelemetry/instrumentation/restlet/v1_1/RestletNetAttributesGetter.java index e2144602e98d..a38e10eb6083 100644 --- a/instrumentation/restlet/restlet-1.1/library/src/main/java/io/opentelemetry/instrumentation/restlet/v1_1/RestletNetAttributesGetter.java +++ b/instrumentation/restlet/restlet-1.1/library/src/main/java/io/opentelemetry/instrumentation/restlet/v1_1/RestletNetAttributesGetter.java @@ -8,17 +8,11 @@ import com.noelios.restlet.http.HttpCall; import com.noelios.restlet.http.HttpRequest; import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import org.restlet.data.Request; final class RestletNetAttributesGetter implements NetServerAttributesGetter { - @Override - public String getTransport(Request request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(Request request) { diff --git a/instrumentation/restlet/restlet-2.0/library/src/main/java/io/opentelemetry/instrumentation/restlet/v2_0/internal/RestletNetAttributesGetter.java b/instrumentation/restlet/restlet-2.0/library/src/main/java/io/opentelemetry/instrumentation/restlet/v2_0/internal/RestletNetAttributesGetter.java index a78388567d69..56e649957d7c 100644 --- a/instrumentation/restlet/restlet-2.0/library/src/main/java/io/opentelemetry/instrumentation/restlet/v2_0/internal/RestletNetAttributesGetter.java +++ b/instrumentation/restlet/restlet-2.0/library/src/main/java/io/opentelemetry/instrumentation/restlet/v2_0/internal/RestletNetAttributesGetter.java @@ -8,7 +8,6 @@ import static java.lang.invoke.MethodType.methodType; import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import javax.annotation.Nullable; @@ -78,11 +77,6 @@ public final class RestletNetAttributesGetter implements NetServerAttributesGett GET_SERVER_ADDRESS = getServerAddress; } - @Override - public String getTransport(Request request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(Request request) { diff --git a/instrumentation/servlet/servlet-2.2/javaagent/src/test/groovy/JettyServlet2Test.groovy b/instrumentation/servlet/servlet-2.2/javaagent/src/test/groovy/JettyServlet2Test.groovy index 3a3529362558..bf3517b8d21b 100644 --- a/instrumentation/servlet/servlet-2.2/javaagent/src/test/groovy/JettyServlet2Test.groovy +++ b/instrumentation/servlet/servlet-2.2/javaagent/src/test/groovy/JettyServlet2Test.groovy @@ -78,9 +78,7 @@ class JettyServlet2Test extends HttpServerTest implements AgentTestTrait @Override Set> httpAttributes(ServerEndpoint endpoint) { - [ - SemanticAttributes.NET_TRANSPORT - ] as Set + [] as Set } @Override diff --git a/instrumentation/servlet/servlet-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/servlet/ServletNetAttributesGetter.java b/instrumentation/servlet/servlet-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/servlet/ServletNetAttributesGetter.java index f4440aa139bd..25149841bd7e 100644 --- a/instrumentation/servlet/servlet-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/servlet/ServletNetAttributesGetter.java +++ b/instrumentation/servlet/servlet-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/servlet/ServletNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.servlet; import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; public class ServletNetAttributesGetter @@ -18,12 +17,6 @@ public ServletNetAttributesGetter(ServletAccessor accessor) { this.accessor = accessor; } - @Override - @Nullable - public String getTransport(ServletRequestContext requestContext) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(ServletRequestContext requestContext) { diff --git a/instrumentation/spark-2.3/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/sparkjava/SparkJavaBasedTest.java b/instrumentation/spark-2.3/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/sparkjava/SparkJavaBasedTest.java index c3dd8dff5ae4..9e5dcfa82b1e 100644 --- a/instrumentation/spark-2.3/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/sparkjava/SparkJavaBasedTest.java +++ b/instrumentation/spark-2.3/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/sparkjava/SparkJavaBasedTest.java @@ -8,7 +8,6 @@ import static io.opentelemetry.api.common.AttributeKey.stringKey; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo; import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.satisfies; -import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NetTransportValues.IP_TCP; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; @@ -69,7 +68,6 @@ void generatesSpans() { SemanticAttributes.USER_AGENT_ORIGINAL, val -> val.isInstanceOf(String.class)), equalTo(SemanticAttributes.HTTP_ROUTE, "/param/:param"), - equalTo(SemanticAttributes.NET_TRANSPORT, IP_TCP), equalTo(stringKey("net.protocol.name"), "http"), equalTo(stringKey("net.protocol.version"), "1.1"), equalTo(SemanticAttributes.NET_HOST_NAME, "localhost"), diff --git a/instrumentation/spring/spring-web/spring-web-3.1/library/src/main/java/io/opentelemetry/instrumentation/spring/web/v3_1/SpringWebNetAttributesGetter.java b/instrumentation/spring/spring-web/spring-web-3.1/library/src/main/java/io/opentelemetry/instrumentation/spring/web/v3_1/SpringWebNetAttributesGetter.java index 4a47d826ee7a..ca9bb258e901 100644 --- a/instrumentation/spring/spring-web/spring-web-3.1/library/src/main/java/io/opentelemetry/instrumentation/spring/web/v3_1/SpringWebNetAttributesGetter.java +++ b/instrumentation/spring/spring-web/spring-web-3.1/library/src/main/java/io/opentelemetry/instrumentation/spring/web/v3_1/SpringWebNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.spring.web.v3_1; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import org.springframework.http.HttpRequest; import org.springframework.http.client.ClientHttpResponse; @@ -14,11 +13,6 @@ final class SpringWebNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(HttpRequest httpRequest, @Nullable ClientHttpResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override @Nullable public String getPeerName(HttpRequest httpRequest) { diff --git a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/WebfluxServerNetAttributesGetter.java b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/WebfluxServerNetAttributesGetter.java index 94954cf918ca..3ac965965760 100644 --- a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/WebfluxServerNetAttributesGetter.java +++ b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/WebfluxServerNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.spring.webflux.v5_3; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import java.net.InetSocketAddress; import javax.annotation.Nullable; import org.springframework.web.server.ServerWebExchange; @@ -14,11 +13,6 @@ final class WebfluxServerNetAttributesGetter extends InetSocketAddressNetServerAttributesGetter { - @Override - public String getTransport(ServerWebExchange request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getHostName(ServerWebExchange request) { diff --git a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/internal/WebClientNetAttributesGetter.java b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/internal/WebClientNetAttributesGetter.java index b58942939481..923253799ca0 100644 --- a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/internal/WebClientNetAttributesGetter.java +++ b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/internal/WebClientNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.instrumentation.spring.webflux.v5_3.internal; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import org.springframework.web.reactive.function.client.ClientRequest; import org.springframework.web.reactive.function.client.ClientResponse; @@ -18,11 +17,6 @@ public final class WebClientNetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(ClientRequest request, @Nullable ClientResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getPeerName(ClientRequest request) { diff --git a/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcNetAttributesGetter.java b/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcNetAttributesGetter.java index 0934c789b416..4a4af584a1e9 100644 --- a/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcNetAttributesGetter.java +++ b/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcNetAttributesGetter.java @@ -6,18 +6,12 @@ package io.opentelemetry.instrumentation.spring.webmvc.v5_3; import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import javax.servlet.http.HttpServletRequest; enum SpringWebMvcNetAttributesGetter implements NetServerAttributesGetter { INSTANCE; - @Override - public String getTransport(HttpServletRequest request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(HttpServletRequest request) { diff --git a/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcNetAttributesGetter.java b/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcNetAttributesGetter.java index 24f9ad8f2605..f814e9381811 100644 --- a/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcNetAttributesGetter.java +++ b/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcNetAttributesGetter.java @@ -6,18 +6,12 @@ package io.opentelemetry.instrumentation.spring.webmvc.v6_0; import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import jakarta.servlet.http.HttpServletRequest; import javax.annotation.Nullable; enum SpringWebMvcNetAttributesGetter implements NetServerAttributesGetter { INSTANCE; - @Override - public String getTransport(HttpServletRequest request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(HttpServletRequest request) { diff --git a/instrumentation/tomcat/tomcat-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/tomcat/common/TomcatNetAttributesGetter.java b/instrumentation/tomcat/tomcat-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/tomcat/common/TomcatNetAttributesGetter.java index c5a95eee79eb..a26388dd99d7 100644 --- a/instrumentation/tomcat/tomcat-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/tomcat/common/TomcatNetAttributesGetter.java +++ b/instrumentation/tomcat/tomcat-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/tomcat/common/TomcatNetAttributesGetter.java @@ -8,19 +8,12 @@ import static io.opentelemetry.javaagent.instrumentation.tomcat.common.TomcatHelper.messageBytesToString; import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import javax.annotation.Nullable; import org.apache.coyote.ActionCode; import org.apache.coyote.Request; public class TomcatNetAttributesGetter implements NetServerAttributesGetter { - @Override - @Nullable - public String getTransport(Request request) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(Request request) { diff --git a/instrumentation/twilio-6.6/javaagent/src/test/groovy/test/TwilioClientTest.groovy b/instrumentation/twilio-6.6/javaagent/src/test/groovy/test/TwilioClientTest.groovy index 3871e591cbe4..7cede2a78ce8 100644 --- a/instrumentation/twilio-6.6/javaagent/src/test/groovy/test/TwilioClientTest.groovy +++ b/instrumentation/twilio-6.6/javaagent/src/test/groovy/test/TwilioClientTest.groovy @@ -248,7 +248,6 @@ class TwilioClientTest extends AgentInstrumentationSpecification { kind CLIENT childOf span(1) attributes { - "$SemanticAttributes.NET_TRANSPORT.key" SemanticAttributes.NetTransportValues.IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_PEER_NAME.key" "api.twilio.com" @@ -316,7 +315,6 @@ class TwilioClientTest extends AgentInstrumentationSpecification { childOf span(1) status ERROR attributes { - "$SemanticAttributes.NET_TRANSPORT.key" SemanticAttributes.NetTransportValues.IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_PEER_NAME.key" "api.twilio.com" @@ -330,7 +328,6 @@ class TwilioClientTest extends AgentInstrumentationSpecification { kind CLIENT childOf span(1) attributes { - "$SemanticAttributes.NET_TRANSPORT.key" SemanticAttributes.NetTransportValues.IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_PEER_NAME.key" "api.twilio.com" @@ -405,7 +402,6 @@ class TwilioClientTest extends AgentInstrumentationSpecification { childOf span(1) status ERROR attributes { - "$SemanticAttributes.NET_TRANSPORT.key" SemanticAttributes.NetTransportValues.IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_PEER_NAME.key" "api.twilio.com" @@ -419,7 +415,6 @@ class TwilioClientTest extends AgentInstrumentationSpecification { kind CLIENT childOf span(1) attributes { - "$SemanticAttributes.NET_TRANSPORT.key" SemanticAttributes.NetTransportValues.IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_PEER_NAME.key" "api.twilio.com" diff --git a/instrumentation/undertow-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/undertow/UndertowNetAttributesGetter.java b/instrumentation/undertow-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/undertow/UndertowNetAttributesGetter.java index 632c1e85ad2e..476dcd671002 100644 --- a/instrumentation/undertow-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/undertow/UndertowNetAttributesGetter.java +++ b/instrumentation/undertow-1.4/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/undertow/UndertowNetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.undertow; import io.opentelemetry.instrumentation.api.instrumenter.net.InetSocketAddressNetServerAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import io.undertow.server.HttpServerExchange; import java.net.InetSocketAddress; import javax.annotation.Nullable; @@ -14,11 +13,6 @@ public class UndertowNetAttributesGetter extends InetSocketAddressNetServerAttributesGetter { - @Override - public String getTransport(HttpServerExchange exchange) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getProtocolName(HttpServerExchange exchange) { diff --git a/instrumentation/undertow-1.4/javaagent/src/test/groovy/UndertowServerTest.groovy b/instrumentation/undertow-1.4/javaagent/src/test/groovy/UndertowServerTest.groovy index 4f3c02814313..aacc32624cc3 100644 --- a/instrumentation/undertow-1.4/javaagent/src/test/groovy/UndertowServerTest.groovy +++ b/instrumentation/undertow-1.4/javaagent/src/test/groovy/UndertowServerTest.groovy @@ -152,7 +152,6 @@ class UndertowServerTest extends HttpServerTest implements AgentTestTr "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" Long "$SemanticAttributes.HTTP_SCHEME" "http" "$SemanticAttributes.HTTP_TARGET" "/sendResponse" - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" uri.host @@ -207,7 +206,6 @@ class UndertowServerTest extends HttpServerTest implements AgentTestTr "$SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH" Long "$SemanticAttributes.HTTP_SCHEME" "http" "$SemanticAttributes.HTTP_TARGET" "/sendResponseWithException" - "$SemanticAttributes.NET_TRANSPORT" SemanticAttributes.NetTransportValues.IP_TCP "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_HOST_NAME" uri.host diff --git a/instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/v3_0/client/Vertx3NetAttributesGetter.java b/instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/v3_0/client/Vertx3NetAttributesGetter.java index 8f38a06c0351..fa5efd89d047 100644 --- a/instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/v3_0/client/Vertx3NetAttributesGetter.java +++ b/instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/v3_0/client/Vertx3NetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.vertx.v3_0.client; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import io.vertx.core.http.HttpClientRequest; import io.vertx.core.http.HttpClientResponse; import io.vertx.core.net.SocketAddress; @@ -16,11 +15,6 @@ enum Vertx3NetAttributesGetter implements NetClientAttributesGetter { INSTANCE; - @Override - public String getTransport(HttpClientRequest request, @Nullable HttpClientResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Nullable @Override public String getPeerName(HttpClientRequest request) { diff --git a/instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/client/Vertx4NetAttributesGetter.java b/instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/client/Vertx4NetAttributesGetter.java index 9113bcbccfe3..432bd33005a1 100644 --- a/instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/client/Vertx4NetAttributesGetter.java +++ b/instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/client/Vertx4NetAttributesGetter.java @@ -6,7 +6,6 @@ package io.opentelemetry.javaagent.instrumentation.vertx.v4_0.client; import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter; -import io.opentelemetry.semconv.trace.attributes.SemanticAttributes; import io.vertx.core.http.HttpClientRequest; import io.vertx.core.http.HttpClientResponse; import io.vertx.core.http.HttpVersion; @@ -16,11 +15,6 @@ final class Vertx4NetAttributesGetter implements NetClientAttributesGetter { - @Override - public String getTransport(HttpClientRequest request, @Nullable HttpClientResponse response) { - return SemanticAttributes.NetTransportValues.IP_TCP; - } - @Override public String getProtocolName(HttpClientRequest request, @Nullable HttpClientResponse response) { return "http"; diff --git a/instrumentation/vertx/vertx-rx-java-3.5/javaagent/src/latestDepTest/groovy/VertxReactivePropagationTest.groovy b/instrumentation/vertx/vertx-rx-java-3.5/javaagent/src/latestDepTest/groovy/VertxReactivePropagationTest.groovy index c3d06c6f9a59..584776fea0ac 100644 --- a/instrumentation/vertx/vertx-rx-java-3.5/javaagent/src/latestDepTest/groovy/VertxReactivePropagationTest.groovy +++ b/instrumentation/vertx/vertx-rx-java-3.5/javaagent/src/latestDepTest/groovy/VertxReactivePropagationTest.groovy @@ -63,7 +63,7 @@ class VertxReactivePropagationTest extends AgentInstrumentationSpecification { kind SERVER hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP + "$SemanticAttributes.NET_TRANSPORT" { it == null || it == IP_TCP } "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" @@ -157,7 +157,7 @@ class VertxReactivePropagationTest extends AgentInstrumentationSpecification { kind SERVER childOf(span(0)) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP + "$SemanticAttributes.NET_TRANSPORT" { it == null || it == IP_TCP } "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" diff --git a/instrumentation/vertx/vertx-rx-java-3.5/javaagent/src/version35Test/groovy/VertxReactivePropagationTest.groovy b/instrumentation/vertx/vertx-rx-java-3.5/javaagent/src/version35Test/groovy/VertxReactivePropagationTest.groovy index c3d06c6f9a59..584776fea0ac 100644 --- a/instrumentation/vertx/vertx-rx-java-3.5/javaagent/src/version35Test/groovy/VertxReactivePropagationTest.groovy +++ b/instrumentation/vertx/vertx-rx-java-3.5/javaagent/src/version35Test/groovy/VertxReactivePropagationTest.groovy @@ -63,7 +63,7 @@ class VertxReactivePropagationTest extends AgentInstrumentationSpecification { kind SERVER hasNoParent() attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP + "$SemanticAttributes.NET_TRANSPORT" { it == null || it == IP_TCP } "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" @@ -157,7 +157,7 @@ class VertxReactivePropagationTest extends AgentInstrumentationSpecification { kind SERVER childOf(span(0)) attributes { - "$SemanticAttributes.NET_TRANSPORT" IP_TCP + "$SemanticAttributes.NET_TRANSPORT" { it == null || it == IP_TCP } "net.protocol.name" "http" "net.protocol.version" "1.1" "$SemanticAttributes.NET_SOCK_PEER_ADDR" "127.0.0.1" diff --git a/testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy b/testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy index 608dc77e82fa..611ae6545d33 100644 --- a/testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy +++ b/testing-common/src/main/groovy/io/opentelemetry/instrumentation/test/base/HttpServerTest.groovy @@ -152,7 +152,6 @@ abstract class HttpServerTest extends InstrumentationSpecification imple Set> httpAttributes(ServerEndpoint endpoint) { [ SemanticAttributes.HTTP_ROUTE, - SemanticAttributes.NET_TRANSPORT, SemanticAttributes.NET_SOCK_PEER_PORT ] as Set } diff --git a/testing-common/src/main/java/io/opentelemetry/instrumentation/testing/TestInstrumenters.java b/testing-common/src/main/java/io/opentelemetry/instrumentation/testing/TestInstrumenters.java index a2b7e491bbef..0d57f5642f02 100644 --- a/testing-common/src/main/java/io/opentelemetry/instrumentation/testing/TestInstrumenters.java +++ b/testing-common/src/main/java/io/opentelemetry/instrumentation/testing/TestInstrumenters.java @@ -184,12 +184,6 @@ public String getScheme(String unused) { private enum NetServerGetter implements NetServerAttributesGetter { INSTANCE; - @Nullable - @Override - public String getTransport(String unused) { - return null; - } - @Nullable @Override public String getHostName(String unused) { diff --git a/testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/HttpServerTestOptions.java b/testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/HttpServerTestOptions.java index ffa51924d9f6..557ddb87158a 100644 --- a/testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/HttpServerTestOptions.java +++ b/testing-common/src/main/java/io/opentelemetry/instrumentation/testing/junit/http/HttpServerTestOptions.java @@ -21,10 +21,7 @@ public final class HttpServerTestOptions { public static final Set> DEFAULT_HTTP_ATTRIBUTES = Collections.unmodifiableSet( new HashSet<>( - Arrays.asList( - SemanticAttributes.HTTP_ROUTE, - SemanticAttributes.NET_TRANSPORT, - SemanticAttributes.NET_PEER_PORT))); + Arrays.asList(SemanticAttributes.HTTP_ROUTE, SemanticAttributes.NET_PEER_PORT))); public static final SpanNameMapper DEFAULT_EXPECTED_SERVER_SPAN_NAME_MAPPER = (uri, method, route) -> route == null ? method : method + " " + route;