Skip to content

Commit

Permalink
Fix another reverse lookup (open-telemetry#5393)
Browse files Browse the repository at this point in the history
* 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 44c9e91.
  • Loading branch information
trask authored and RashmiRam committed May 23, 2022
1 parent d29d541 commit 555a32f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ public String transport(Request request) {
@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
Expand Down

0 comments on commit 555a32f

Please sign in to comment.