Skip to content

Commit

Permalink
http.url must not contain credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Hangzhi committed Apr 3, 2021
1 parent 87950d1 commit c3bf9c5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,13 @@ private void setUrl(AttributeSetter setter, REQUEST request) {
try {
URI url = url(request);
if (url != null) {
if (url.getUserInfo() != null) {
throw new IllegalArgumentException("http.url MUST NOT contain credentials!");
}
netPeerAttributes.setNetPeer(setter, url.getHost(), null, url.getPort());
setter.setAttribute(SemanticAttributes.HTTP_URL, url.toString());
}

} catch (Exception e) {
log.debug("Error tagging url", e);
}
Expand Down

0 comments on commit c3bf9c5

Please sign in to comment.