-
Notifications
You must be signed in to change notification settings - Fork 35
feat: add TenantId to default logger properties #1113
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: add TenantId to default logger properties #1113
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1113 +/- ##
===========================================
+ Coverage 79.22% 79.23% +0.01%
===========================================
Files 299 299
Lines 12435 12441 +6
Branches 1489 1490 +1
===========================================
+ Hits 9852 9858 +6
Misses 2128 2128
Partials 455 455 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
hjgraca
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
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 pull request adds TenantId support to the Powertools logging library to enable AWS Lambda Tenant Isolation observability. The changes capture the TenantId from the ILambdaContext and store it in the internal LoggingLambdaContext for use in logging.
Key Changes:
- Added TenantId property to LoggingLambdaContext internal class
- Updated context extraction logic to capture TenantId from ILambdaContext
- Extended test coverage to validate TenantId extraction
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| libraries/src/AWS.Lambda.Powertools.Logging/Internal/LoggingLambdaContext.cs | Added TenantId property and extraction logic to capture tenant information from Lambda context |
| libraries/tests/AWS.Lambda.Powertools.Logging.Tests/Context/LambdaContextTest.cs | Updated test cases to include TenantId in test setup and validation assertions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libraries/src/AWS.Lambda.Powertools.Logging/Internal/LoggingLambdaContext.cs
Outdated
Show resolved
Hide resolved
libraries/src/AWS.Lambda.Powertools.Logging/Internal/LoggingLambdaContext.cs
Outdated
Show resolved
Hide resolved
|
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |



Issue number: #1109
Summary
Adds the TenantId from ILambdaContext to the default logger properties to support
AWS Lambda Tenant Isolation observability.
Changes
User experience
Checklist
Please leave checklist items unchecked if they do not apply to your change.
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.