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 1fd5da7796b6..e8b95cb61ffb 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 @@ -20,7 +20,8 @@ public String transport(ChannelAndMethod channelAndMethod, @Nullable Void unused @Nullable @Override public String peerName(ChannelAndMethod channelAndMethod, @Nullable Void unused) { - return channelAndMethod.getChannel().getConnection().getAddress().getHostName(); + // not using InetAddress.getHostName() since that can trigger reverse name lookup + return null; } @Nullable 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 09cca9bbab54..d51e752b8a29 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 @@ -21,7 +21,8 @@ public String transport(ReceiveRequest request, @Nullable GetResponse response) @Nullable @Override public String peerName(ReceiveRequest request, @Nullable GetResponse response) { - return request.getConnection().getAddress().getHostName(); + // not using InetAddress.getHostName() since that can trigger reverse name lookup + return null; } @Nullable diff --git a/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/ReactorNettyHttpClientAttributesGetter.java b/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/ReactorNettyHttpClientAttributesGetter.java index cfb8380f45e9..829f1f17e3ae 100644 --- a/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/ReactorNettyHttpClientAttributesGetter.java +++ b/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/reactornetty/v1_0/ReactorNettyHttpClientAttributesGetter.java @@ -37,7 +37,7 @@ public String url(HttpClientConfig request) { if (hostAddress instanceof InetSocketAddress) { InetSocketAddress inetHostAddress = (InetSocketAddress) hostAddress; return (request.isSecure() ? "https://" : "http://") - + inetHostAddress.getHostName() + + inetHostAddress.getHostString() + ":" + inetHostAddress.getPort() + (uri.startsWith("/") ? "" : "/")