-
Notifications
You must be signed in to change notification settings - Fork 97
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
base: main
Are you sure you want to change the base?
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
Thank you @rtreffler! Once you've signed the CLA we'll be able to review and merge. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #326 +/- ##
=========================================
Coverage 85.87% 85.87%
Complexity 1081 1081
=========================================
Files 73 73
Lines 4480 4480
=========================================
Hits 3847 3847
Misses 633 633
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
|
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.
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.