Skip to content
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 instrumentation on dependent (gathered) asyncio tasks #19

Closed
garyd203 opened this issue Aug 26, 2020 · 1 comment · Fixed by #23
Closed

Fix instrumentation on dependent (gathered) asyncio tasks #19

garyd203 opened this issue Aug 26, 2020 · 1 comment · Fixed by #23

Comments

@garyd203
Copy link
Owner

garyd203 commented Aug 26, 2020

subsegment parents should work correctly. Use case is a request handler that spawns multiple asyncio tasks, and then gathers them all together to compose the response (eg. tartiflette)

My working theory is that aws-xray-sdk has a bug where it copies a reference to the context dictionary onto a new task, rather than deep/shallow -copying the values. This menas that subsegments do push/pop on the same list, so the push/pop could be interleaved in an incorrect order.

This bugfix should definitely be moved into the upstream aws-xray-sdk-python repo as a PR.

@garyd203
Copy link
Owner Author

Have managed to write a broken test, and fix it by redoing the new-task context copy. Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant