-
Notifications
You must be signed in to change notification settings - Fork 117
fix(Aws): fixes wrong aws client name and region binding when appending middlewares #326
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(Aws): fixes wrong aws client name and region binding when appending middlewares #326
Conversation
…ng middlewares Binding happened outside the foreach loop resulting in binding the same values for all instrumented clients. Similar problem was affecting span and scope object variables, where multiple clients could overwrite each other spans.
|
Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one. |
| @@ -0,0 +1,149 @@ | |||
| <?php | |||
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.
this file is copied almost exactly how it was written in AWS PHP SDK: https://github.com/aws/aws-sdk-php/blob/master/tests/UsesServiceTrait.php
not sure that is important, thought its worth mentioning
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.
its now a modified subset of that file
|
Thank you @rtreffler! Once you've signed the CLA we'll be able to review and merge. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #326 +/- ##
============================================
+ Coverage 80.42% 84.75% +4.32%
+ Complexity 1502 1353 -149
============================================
Files 128 101 -27
Lines 6176 5627 -549
============================================
- Hits 4967 4769 -198
+ Misses 1209 858 -351 Flags with carried forward coverage won't be shown. Click here to find out more.
... and 27 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
The company I'm currently working for is already working on the CLA topic. |
…strumentation for the same client Async calls would overwrite spans of different clients, so spl_object_has is used to keep span next to its client. Also since we can instrument many clients via consecutive calls to `instrumentClient` and `activate` check is added to prevent duplicate middleware being added.
|
Thank you for patience @bobstrecansky. |
Removes unused methods in UsesServiceTrait.
|
is there a chance we could progress with it this week ? |
Binding happened outside the foreach loop resulting in binding the same values for all instrumented clients. Similar problem was affecting span and scope object variables, where multiple clients could overwrite each other spans.