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

backend/http: fix client shadowing that caused trace scrambling #18

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

roobre
Copy link
Member

@roobre roobre commented Jul 24, 2023

I submit this PR as an acknowledgement that it has been 0 days since the last time that Go's variable shadowing in lambdas made me waste 1 hour debugging. Fool me once, same on you; fool me 27 times, shame on me.

This PR fixes a bug where the contextualized clients were overriding each other, instead of being contextualized per each request.
This caused traces to be scrambled when two requests were processed in parallel, with their parents mixed up.

@roobre roobre requested a review from dgzlopes July 24, 2023 22:31
@roobre roobre merged commit 26c87d0 into main Jul 27, 2023
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 this pull request may close these issues.

2 participants