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 44c9e91048.
This commit is contained in:
Trask Stalnaker 2022-02-18 08:54:08 -08:00 committed by GitHub
parent 698503cbec
commit 2f5e1f0703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -22,8 +22,9 @@ public class TomcatNetAttributesGetter implements NetServerAttributesGetter<Requ
@Override @Override
@Nullable @Nullable
public String peerName(Request request) { public String peerName(Request request) {
request.action(ActionCode.REQ_HOST_ATTRIBUTE, request); // not using request.action(ActionCode.REQ_HOST_ATTRIBUTE, request) since that calls
return request.remoteHost().toString(); // InetAddress.getHostName() which trigger reverse name lookup
return null;
} }
@Override @Override