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 async context propagation #12880

Closed
6 tasks done
dbolduc opened this issue Oct 12, 2023 · 0 comments · Fixed by #13156
Closed
6 tasks done

Fix async context propagation #12880

dbolduc opened this issue Oct 12, 2023 · 0 comments · Fixed by #13156
Assignees
Labels
cpp: opentelemetry priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@dbolduc
Copy link
Member

dbolduc commented Oct 12, 2023

Our tracing connection spans for asynchronous operations are still active in the continuations (the .then()s). They should not be. These continuations happen after the operation completes.

auto f = AsyncFoo().then([] (auto f) {
  // The span for "AsyncFoo" is still active here when it should not be.
  return f.get();
});

This is especially problematic when we try to chain multiple asynchronous calls together. They show up as children of each other instead of siblings.


Googlers can see go/cloud-cxx:otel-async-context-propagation-dd for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cpp: opentelemetry priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
@dbolduc and others