-
Notifications
You must be signed in to change notification settings - Fork 403
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
feat(logger): add get_correlation_id method #516
feat(logger): add get_correlation_id method #516
Conversation
Call remove_keys when the correlation_id is set to None
Codecov Report
@@ Coverage Diff @@
## develop #516 +/- ##
========================================
Coverage 99.23% 99.23%
========================================
Files 113 113
Lines 4468 4472 +4
Branches 243 244 +1
========================================
+ Hits 4434 4438 +4
Misses 22 22
Partials 12 12
Continue to review full report at Codecov.
|
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 ;-)
@heitorlessa should we go ahead with this feature? |
I've just added a comment in the RFC. TL;DR: Definitely yes for Getter, perhaps even a generic one to grab any key. Not yet for the remove correlation ID method. |
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.
By default, Logger removes any key with None
value before emitting a log entry.
@heitorlessa made the changes. the diff is much more minimal, but still meet the needs of the original RFC |
Thanks a lot again @michaelbrewer ! |
…ent-subclass * develop: refactor(feature-toggles): Code coverage and housekeeping (aws-powertools#530) feat(logger): add get_correlation_id method (aws-powertools#516)
Issue #, if available:
Description of changes:
remove_keys["correlation_id"]
when the correlation_id is set to None.get_correlation_id
callChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.