-
Notifications
You must be signed in to change notification settings - Fork 406
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
fix(logger): strip xray_trace_id when explicitly disabled #2852
fix(logger): strip xray_trace_id when explicitly disabled #2852
Conversation
Signed-off-by: heitorlessa <[email protected]>
Signed-off-by: heitorlessa <[email protected]>
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## develop #2852 +/- ##
========================================
Coverage 97.57% 97.57%
========================================
Files 162 162
Lines 7473 7475 +2
Branches 1416 1416
========================================
+ Hits 7292 7294 +2
Misses 133 133
Partials 48 48
☔ View full report in Codecov by Sentry. |
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.
Hei @heitorlessa! I tried to find information about this parameter xray_trace_id
in our documentation and I couldn't find. Should we add a section or banner in the Advanced section to explain this?
It's documented under Overriding Log Record: https://docs.powertools.aws.dev/lambda/python/latest/core/logger/#overriding-log-records |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Issue number: #2835
Summary
This PR addresses the issue of X-Ray Trace ID key (
xray_trace_id
) not being removed despite being explicitly disabled.Changes
User experience
Setting X-Ray Trace ID env var produces no effect when explicitly disabling at
Logger
constructor (as expected now)_X_AMZN_TRACE_ID="Root=1-5759e988-bd862e3fe1be46a994272793;Parent=53995c3f42cd8ad8;Sampled=1" python bla.py
Output
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.