-
Notifications
You must be signed in to change notification settings - Fork 436
feat(typing): add tenant_id property #6985
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
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 adding this, still need to test in Node.js.
Before merging, can you please add the key to this table?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #6985 +/- ##
========================================
Coverage 96.25% 96.25%
========================================
Files 274 274
Lines 12856 12860 +4
Branches 950 950
========================================
+ Hits 12374 12378 +4
Misses 377 377
Partials 105 105 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is a good point, and I didn't intentionally change it. In Python, we don't dump the entire context to the log, but just add a few fields: https://github.com/aws-powertools/powertools-lambda-python/blob/develop/aws_lambda_powertools/logging/lambda_context.py#L37 To be honest, I'm not sure we should add I'd like to hear from you. |
Ok that makes sense, so this PR only adds it to the If this is the case, do we want customers to know about it? Or have an easy way to use it with the Logger? Right now if I'm using this feature in Lambda, as a customer using Logger I understand the only way I have is to do something like |
I think it makes sense. Let me work in this page to add all the fields customers can access when using |
Cool, I'm looking at notifications so feel free to re-request a review when you want me to check it. |
|
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.
Thank you for adding more info to the docs - let's go!
Issue number: #6799
Summary
Changes
AWS Lambda RIC added a new field called tenant_id and we need to add this field to the context. This must be a string.
Also, I tested functions that already exists and new one and all of them are sending this context right now.
LambdaContext([aws_request_id=faf26568-ecb9-454b-a8f2-ff426c2fe22e,log_group_name=/aws/lambda/myfuncp13,log_stream_name=2025/06/12/[$LATEST]4c6c2d6baa594a008b5aeeea5017d6f4,function_name=myfuncp13,memory_limit_in_mb=128,function_version=$LATEST,invoked_function_arn=arn:aws:lambda:us-east-1:xxxxxx:function:myfuncp13,client_context=None,identity=CognitoIdentity([cognito_identity_id=None,cognito_identity_pool_id=None]),tenant_id=None])
User experience
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.