-
Notifications
You must be signed in to change notification settings - Fork 453
docs(logger): clarify Advanced Logging Controls interaction with sampling #7429
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
docs(logger): clarify Advanced Logging Controls interaction with sampling #7429
Conversation
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.
Pull Request Overview
This PR improves documentation clarity around AWS Lambda Advanced Logging Controls (ALC) interaction with Powertools Logger sampling functionality. The changes address user confusion about when Lambda's log level settings override Powertools configuration, potentially causing unexpected sampling behavior.
Key changes:
- Added detailed explanation of CDK
applicationLogLevelV2
parameter behavior in log level priority section - Added reference to ALC interaction within the sampling introduction section
- Clarified how Lambda automatically sets
AWS_LAMBDA_LOG_LEVEL
environment variable
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Hey @kattakaha! Can you please only incorporate this small change and then we merge?
dfc8509#diff-e42af4aee30a146e6e51be432c4a80c93e50d552f7b70403fa301ecf11d355c4R378
@leandrodamascena Sorry for missing that change in the new PR! I've now added the broken ALC documentation link fix as requested. Thanks for your patience with the multiple iterations. |
|
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.
Thanks for working on this @kattakaha! APPROVED!
Issue number: closes #7220
Summary
Changes
This PR addresses documentation improvements for AWS Lambda Advanced Logging Controls (ALC) interaction with Powertools Logger sampling functionality. The changes clarify how Lambda's log level settings override Powertools configuration and provide clear guidance to avoid confusion.
Based on review feedback from @leandrodamascena in PR #7412:
User experience
Before: Users were confused about the interaction between Lambda's Advanced Logging Controls and Powertools sampling settings, leading to unexpected behavior where sampling didn't work as expected when ALC was set to DEBUG level.
After: Users have clear documentation explaining:
applicationLogLevelV2
automatically setsAWS_LAMBDA_LOG_LEVEL
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.