-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISSUE-2674 Strip sensitive data from the url #6417
Merged
Merged
Changes from 5 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4ba4e71
ISSUE-2674 Strip sensitive data from the url when used in the clientA…
MALPI bc1ff06
Update instrumentation-api-semconv/src/main/java/io/opentelemetry/ins…
MALPI 89699d1
Update instrumentation-api-semconv/src/main/java/io/opentelemetry/ins…
MALPI 4da196e
Issue-2674 Replace regular expression with index of in order to avoid…
MALPI 76e9bf8
Issue-2674 Add check to only do replacement logic in case the address…
MALPI 6adfacd
Issue-2674 Fix issues reported by checkstyle, apply suggestion not to…
MALPI 5d90ea7
ISSUE-2674 Add check for the scheme and a few more test cases
MALPI c9dcfb9
ISSUE-2674 Change to parameterized test
MALPI 462c6d2
Merge branch 'main' into bug/issue-2674
MALPI 8904b56
ISSUE-2674 Add few more test cases
MALPI bb30785
ISSUE-2674 Check for the end of the host by making use of code from U…
MALPI 1101c16
Update instrumentation-api-semconv/src/main/java/io/opentelemetry/ins…
MALPI 92ee662
Update instrumentation-api-semconv/src/main/java/io/opentelemetry/ins…
MALPI 8434511
Update instrumentation-api-semconv/src/main/java/io/opentelemetry/ins…
MALPI 1f41637
Update instrumentation-api-semconv/src/main/java/io/opentelemetry/ins…
MALPI ffdea7d
ISSUE-2674 Fix unit tests
MALPI a25875e
ISSUE-2674 drop questionmarkindex variable and check if at character …
MALPI 6b97196
Update instrumentation-api-semconv/src/main/java/io/opentelemetry/ins…
MALPI 85f4c4f
ISSUE-2674 avoid looking up at character twice
MALPI 054debc
Merge remote-tracking branch 'origin/bug/issue-2674' into bug/issue-2674
MALPI File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,6 +140,21 @@ void normal() { | |
asList("654", "321"))); | ||
} | ||
|
||
@Test | ||
public void stripBasicAuthTest() { | ||
Map<String, String> request = new HashMap<>(); | ||
request.put("url", "https://user1:[email protected]"); | ||
|
||
HttpClientAttributesExtractor<Map<String, String>, Map<String, String>> extractor = | ||
HttpClientAttributesExtractor.builder(new TestHttpClientAttributesGetter()).build(); | ||
|
||
AttributesBuilder attributes = Attributes.builder(); | ||
extractor.onStart(attributes, Context.root(), request); | ||
|
||
assertThat(attributes.build()) | ||
.containsOnly(entry(SemanticAttributes.HTTP_URL, "https://github.com")); | ||
} | ||
|
||
@Test | ||
void invalidStatusCode() { | ||
Map<String, String> request = new HashMap<>(); | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: no need to lookup
"@"
twice: