-
Notifications
You must be signed in to change notification settings - Fork 979
Added logic for Url redaction #5743
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
Conversation
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
ecef4bf to
61b567c
Compare
|
Thanks for addressing my comments. I don't have anything else to add, but I can't sign off either. |
No problem. Thanks a lot for the comments, they were very helpful. |
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-enable.test.ts
Show resolved
Hide resolved
61b567c to
226e7ba
Compare
hectorhdzg
left a comment
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.
LGTM
|
The certificates have been regenerated through another PR. Once that gets merged, the tests should pass on this PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5743 +/- ##
=======================================
Coverage 95.01% 95.01%
=======================================
Files 303 303
Lines 7946 7946
Branches 1607 1607
=======================================
Hits 7550 7550
Misses 396 396 🚀 New features to boost your workflow:
|
82c5b65 to
7523d99
Compare
dyladan
left a comment
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.
It looks like the behavior here is not configurable. Given that the spec is in development, I think we should allow for users to disable or modify this in some way if they don't want it. I suggest we provide a configuration like redactedQueryParams and have the default value be the list of keys here. This would allow the user to override the list with one of their own if they want to add or remove redacted fields.
Makes sense. I will add this configuration. @dyladan I have a question related to this configuration -
|
experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts
Show resolved
Hide resolved
79d9587 to
6249303
Compare
|
@pichlermarc, @dyladan for now I have implemented the logic, which allows users to add values but the default set provided in the specification will always be redacted. Please take a look at the changes and advise if the logic needs to be revised or if we should proceed with this approach. |
|
Please try to avoid changing history with rebase and force push. It prevents previous comments from being properly linked to the code in the PR |
…hould be redacted
3fef69b to
73171e5
Compare
|
@dyladan Apologies, I completely forgot about the comment for not rebasing. For this change, I did a rebase. |
Yes, sounds good to me. I have added support for this configuration. Could you please take another look at it when you get a chance. |
dyladan
left a comment
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.
I think this is on the right path. Left some comments but overall it looks ok
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
Outdated
Show resolved
Hide resolved
|
Thank you for your contribution @rads-1996! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. |
Which problem is this PR solving?
Fixes # (5741)
Short description of the changes
This pull request provides an implementation for issue [#5741] which points to a specification which states that specific URL query string values should be redacted by default. This PR also aligns with the semantic conventions for HTTP spans which states that sensitive content provided in url.full SHOULD be scrubbed when instrumentations can identify it, in such case username and password SHOULD be redacted (https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md).
This implementation removes the values of query string parameters for the following keys by default:
Note: This is not an exhaustive list and is subject to change over time.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: