fix(otel): propagate incoming trace context for HTTP requests#18800
fix(otel): propagate incoming trace context for HTTP requests#18800Betula-L wants to merge 3 commits into
Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Fixes #18801
Related to #219
Related to #12142
Type of change
What does this PR do?
This propagates incoming W3C trace context at the HTTP boundary.
If a request includes
traceparent/tracestate, the server now extracts that context and runs request handling inside it. This lets request traces attach to an upstream trace instead of starting disconnected traces at the server boundary.I kept this scoped to standard OTel/W3C propagation in core. It does not add a vendor-specific tracing backend.
How did you verify your code works?
bun test test/server/trace-context.test.tsbun run typecheckScreenshots / recordings
Not a UI change.
Checklist