exec-server: propagate notification trace context#31729
Draft
anp-oai wants to merge 4 commits into
Draft
Conversation
Align client and server spans with app-server's RPC attributes, centralize client span creation in call_inner so timed calls are traced, and serialize tracing tests that rebuild global callsite interest.
This was referenced Jul 9, 2026
anp-oai
commented
Jul 9, 2026
| @@ -0,0 +1,60 @@ | |||
| use codex_protocol::protocol::W3cTraceContext; | |||
Collaborator
Author
There was a problem hiding this comment.
this test module is overkill, can you remove these tests please
| } | ||
| } | ||
|
|
||
| fn set_notification_span_parent( |
Collaborator
Author
There was a problem hiding this comment.
can we link the detached work without artificially mutating parentage? like a flow event?
| #[test] | ||
| #[serial_test::serial(exec_server_tracing)] | ||
| fn notification_span_uses_inbound_trace_parent() { | ||
| let span_exporter = InMemorySpanExporter::default(); |
Collaborator
Author
There was a problem hiding this comment.
no need to test this, please remove this test
| } | ||
| } | ||
|
|
||
| pub(crate) fn should_trace_server_notification(method: &str, params: &Value) -> bool { |
Collaborator
Author
There was a problem hiding this comment.
just trace them all until we have performance evidence otherwise, should the trace context be non-optional on the protocol struct?
|
|
||
| #[tokio::test(flavor = "current_thread")] | ||
| #[serial_test::serial(exec_server_tracing)] | ||
| async fn notification_senders_propagate_current_trace_context() { |
Collaborator
Author
There was a problem hiding this comment.
remove this test please
a88ece9 to
620b67a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Preserve distributed trace correlation across exec-server JSON-RPC notifications without adding per-chunk hot-path overhead.
What
The wire change is additive and matches request envelopes. The internal
0.0.0Rust notification struct gains a field.Manual validation
just test -p codex-exec-server-protocol— 8 passed.just test -p codex-exec-server— 308 passed, 2 skipped.Stack