Prevent http.url containing credentials in HttpClientTracer - #2707
Merged
Conversation
Hangzhi
requested review from
anuraaga,
iNikem,
jkwatson,
mateuszrzeszutek,
pavolloffay,
trask and
tylerbenson
as code owners
April 3, 2021 05:29
|
|
anuraaga
reviewed
Apr 3, 2021
iNikem
approved these changes
Apr 6, 2021
fix inconsistency in protocol
mateuszrzeszutek
left a comment
Member
There was a problem hiding this comment.
We also have a few more usages of this attribute: HttpAttributesExtractor from the instrumenter API (should #url() return URI? I think it should), the HttpServerTracer, apache-camel and aws-lambda instrumentations.
Can you fix all of them? Thanks!
trask
reviewed
Apr 20, 2021
Comment on lines
+186
to
+196
| setter.setAttribute( | ||
| SemanticAttributes.HTTP_URL, | ||
| new URI( | ||
| url.getScheme(), | ||
| null, | ||
| url.getHost(), | ||
| url.getPort(), | ||
| url.getPath(), | ||
| url.getQuery(), | ||
| url.getFragment()) | ||
| .toString()); |
Member
There was a problem hiding this comment.
hi @Hangzhi! I think it would be a worthwhile optimization here to only create a new URI object when the existing URI has user-info
Contributor
There was a problem hiding this comment.
@Hangzhi, are you willing to address this comment?
Contributor
There was a problem hiding this comment.
Thanks for the help @Hangzhi I've gone ahead and applied this suggestion to the PR
added 2 commits
May 7, 2021 12:36
…nstrumentation into no-credentials-in-httpurl
anuraaga
approved these changes
May 7, 2021
iNikem
approved these changes
May 7, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes this #2674