Fix another reverse lookup
* Fix another reverse lookup
* Update tests to verify NET_PEER_NAME is never captured for http server spans
* Revert "Update tests to verify NET_PEER_NAME is never captured for http server spans"
This reverts commit
MODIFY
instrumentation/tomcat/tomcat-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/tomcat/common/TomcatNetAttributesGetter.java
instrumentation/tomcat/tomcat-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/tomcat/common/TomcatNetAttributesGetter.java
@@ -22,8 +22,9 @@ public class TomcatNetAttributesGetter implements NetServerAttributesGetter<Requ
@Override
@Nullable
public String peerName(Request request) {
- request.action(ActionCode.REQ_HOST_ATTRIBUTE, request);
- return request.remoteHost().toString();
+ // not using request.action(ActionCode.REQ_HOST_ATTRIBUTE, request) since that calls
+ // InetAddress.getHostName() which trigger reverse name lookup
+ return null;
}
@Override

Fix another reverse lookup (#5393)

* Fix another reverse lookup

* Update tests to verify NET_PEER_NAME is never captured for http server spans

* Revert "Update tests to verify NET_PEER_NAME is never captured for http server spans"

This reverts commit 44c9e910486990039d45eb9f9f4abfb00370d305.