feat(app-server): propagate app-server trace context into core#13368
feat(app-server): propagate app-server trace context into core#13368
Conversation
deed122 to
de30828
Compare
de30828 to
90585ec
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90585ec15e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
a349cc9 to
9fa6c16
Compare
Summary
Propagate trace context originating at app-server RPC method handlers -> codex core submission loop (so this includes spans such as
run_turn!). This implements PR 2 of the app-server tracing rollout.This also removes the old lower-level env-based reparenting in core so explicit request/submission ancestry wins instead of being overridden by ambient
TRACEPARENTstate.What changed
trace: Option<W3cTraceContext>to codex_protocol::SubmissionCodex::submit()/submit_with_id()to automatically capture the current span context when constructing or forwarding a submissionAdded focused unit tests for:
Submission.tracewhen building the core dispatch spanWhy
PR 1 gave us consistent inbound request spans in app-server, but that only covered the transport boundary. For long-running work like turns and reviews, the important missing piece was preserving ancestry after the request handler returns and core continues work on a different async path.
This change makes that handoff explicit and keeps the parentage rules simple:
Submission.tracesnapshots that contextThat also lets us stop relying on env-based reparenting for this path, which was too ambient and could override explicit ancestry.