diff --git a/instrumentation/alibaba-dubbo-2.6/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/alibabadubbo/v2_6/internal/DubboNetClientAttributesGetter.java b/instrumentation/alibaba-dubbo-2.6/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/alibabadubbo/v2_6/internal/DubboNetClientAttributesGetter.java index bce49850db8d..91ca65ca5ff8 100644 --- a/instrumentation/alibaba-dubbo-2.6/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/alibabadubbo/v2_6/internal/DubboNetClientAttributesGetter.java +++ b/instrumentation/alibaba-dubbo-2.6/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/alibabadubbo/v2_6/internal/DubboNetClientAttributesGetter.java @@ -17,26 +17,12 @@ public final class DubboNetClientAttributesGetter implements NetClientAttributesGetter { -/* - @Override - @Nullable - public String getTransport(DubboRequest request, @Nullable Result response) { - return null; - } -*/ - @Nullable @Override public String getServerAddress(DubboRequest request) { return request.url().getHost(); } -/* @Nullable - @Override - public String getPeerName(DubboRequest request) { - return request.url().getHost(); - }*/ - @Nullable @Override public Integer getServerPort(DubboRequest request) { diff --git a/instrumentation/alibaba-dubbo-2.6/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/alibabadubbo/v2_6/internal/DubboNetServerAttributesGetter.java b/instrumentation/alibaba-dubbo-2.6/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/alibabadubbo/v2_6/internal/DubboNetServerAttributesGetter.java index c0095c957180..6ac81f4146b6 100644 --- a/instrumentation/alibaba-dubbo-2.6/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/alibabadubbo/v2_6/internal/DubboNetServerAttributesGetter.java +++ b/instrumentation/alibaba-dubbo-2.6/library-autoconfigure/src/main/java/io/opentelemetry/instrumentation/alibabadubbo/v2_6/internal/DubboNetServerAttributesGetter.java @@ -18,62 +18,29 @@ public final class DubboNetServerAttributesGetter implements NetServerAttributesGetter { -/* @Nullable - @Override - public String getServerAddress(DubboRequest request) { - if (request.remoteAddress()!= null){ - return request.remoteAddress().getHostName(); - } - return ""; - }*/ - - - @Override @Nullable - public InetSocketAddress getClientInetSocketAddress( - DubboRequest request, @Nullable Result status) { - return request.localAddress(); - } - - @Nullable - @Override - public InetSocketAddress getServerInetSocketAddress( - DubboRequest request, @Nullable Result status) { - // TODO: later version introduces TRANSPORT_ATTR_LOCAL_ADDR, might be a good idea to use it - return request.remoteAddress(); - } - -/* @Override - @Nullable - public String getTransport(DubboRequest request) { + public String getServerAddress(DubboRequest request) { return null; } -*/ -/* @Nullable @Override - public String getHostName(DubboRequest request) { - return null; - } -*/ - -/* @Nullable - @Override - public Integer getHostPort(DubboRequest request) { + public Integer getServerPort(DubboRequest request) { return null; } @Override @Nullable - public InetSocketAddress getPeerSocketAddress(DubboRequest request) { + public InetSocketAddress getClientInetSocketAddress( + DubboRequest request, @Nullable Result result) { return request.remoteAddress(); } @Nullable @Override - public InetSocketAddress getHostSocketAddress(DubboRequest request) { + public InetSocketAddress getServerInetSocketAddress( + DubboRequest request, @Nullable Result result) { return request.localAddress(); - }*/ + } }