Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,14 @@ private void setUrl(AttributeSetter setter, REQUEST request) {
URI url = url(request);
if (url != null) {
netPeerAttributes.setNetPeer(setter, url.getHost(), null, url.getPort());
setter.setAttribute(SemanticAttributes.HTTP_URL, url.toString());
if (url.getUserInfo() != null) {
setter.setAttribute(
SemanticAttributes.HTTP_URL, url.toString().replace(url.getUserInfo() + '@', ""));
Comment thread
trask marked this conversation as resolved.
Outdated
} else {
setter.setAttribute(SemanticAttributes.HTTP_URL, url.toString());
}
}

} catch (Exception e) {
log.debug("Error tagging url", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class HttpClientTracerTest extends BaseTracerTest {
false | "https://host:0" | "https://host:0" | "" | null | "host" | null
false | "https://host/path" | "https://host/path" | "" | null | "host" | null
false | "http://host:99/path?query#fragment" | "http://host:99/path?query#fragment" | "" | null | "host" | 99
false | "https://usr:pswd@host/path" | "https://host/path" | "" | null | "host" | null

req = [url: url == null ? null : new URI(url)]
}
Expand Down