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

feat: propagete trace context in queues #3645

Merged
merged 5 commits into from Feb 15, 2024

Conversation

mathnogueira
Copy link
Member

This PR makes the context be propagated to all queues

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Loom video

Add your loom video here if your work can be visualized

Copy link

vercel bot commented Feb 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tracetest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 5:12pm

Comment on lines +83 to +87
workerCtx := context.Background()
if propagator := otel.GetTextMapPropagator(); propagator != nil {
var carrier propagation.HeaderCarrier
workerCtx = propagator.Extract(workerCtx, carrier)
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need a new context here because ctx will be canceled right after this function returns. If I use it, all tests hang.

@mathnogueira mathnogueira merged commit 95758ba into main Feb 15, 2024
39 checks passed
@mathnogueira mathnogueira deleted the feat/propagete-trace-context-queues branch February 15, 2024 22:25
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.

None yet

2 participants