mirror of
https://github.com/openai/codex.git
synced 2026-10-31 19:28:49 +00:00
Add exec-server RPC timing and process startup tracing (#47680)
## Why Detached work can keep request spans open beyond response enqueueing. Record explicit phase timings to distinguish request handling from the full span lifetime. ## What changed - Record server dispatch and response enqueue offsets from request receipt, plus a response enqueue event for HTTP responses that bypass the dispatcher. - Emit client request enqueue and response receipt events, including success or server-error outcomes and reader-to-caller delay. Carry completion timestamps to the awaiting task so receipt events retain its tracing context. - Add spans for process startup, sandbox preparation, shell snapshot preparation and capture, and process spawning. Record process identifiers only when nonempty and at most 64 bytes long. GitOrigin-RevId: 237db898b3284fe8a6a36cb0055b3c7991d8e8a4
This commit is contained in:
committed by
copyberry
parent
8de2d336b8
commit
6fa3bcaae8
@@ -1,5 +1,5 @@
|
||||
//! Emits bounded process lifecycle telemetry using identity captured at launch.
|
||||
//! Reconnects and later process operations must not replace that identity.
|
||||
//! Emits process lifecycle telemetry and bounds process identifiers recorded by tracing.
|
||||
//! Lifecycle events retain the identity captured at launch across reconnects and later operations.
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -76,3 +76,7 @@ impl ProcessTelemetry {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn trace_process_id(process_id: &str) -> Option<&str> {
|
||||
(!process_id.is_empty() && process_id.len() <= 64).then_some(process_id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user