mirror of
https://github.com/openai/codex.git
synced 2026-11-26 07:26:11 +00:00
Trace exec-server requests from receipt through completion (#39098)
## What changed - Start inbound exec-server request spans when messages enter the connection queue and carry them through dispatch and response handling. - Record request outcomes for client-handled network policy callbacks, including errors and disconnections. - Add the `exec_server_request_queue_duration_seconds` histogram, labeled by bounded route name, while excluding synchronous route setup time. ## Testing - Cover span lifetime and trace-parent propagation across server and client queues. - Verify queue-duration telemetry and outcome recording for completed, rejected, and cancelled requests. GitOrigin-RevId: ed67fe5305048bdf283a26ec874337d549e3324f
This commit is contained in:
1 parent
4617d4d21d
commit
fd34ad7297
11 files changed
+558
-52
No files matched your search
@@ -380,7 +380,7 @@ where
|
||||
&mut websocket,
|
||||
&mut keepalive,
|
||||
&incoming_tx,
|
||||
JsonRpcConnectionEvent::Message(message),
|
||||
JsonRpcConnectionEvent::message(message),
|
||||
)
|
||||
.await
|
||||
{
|
||||
@@ -979,10 +979,12 @@ mod tests {
|
||||
.into(),
|
||||
))
|
||||
.await?;
|
||||
assert!(matches!(
|
||||
timeout(Duration::from_secs(1), connection.incoming_rx.recv()).await?,
|
||||
Some(JsonRpcConnectionEvent::Message(actual)) if actual == message
|
||||
));
|
||||
let Some(JsonRpcConnectionEvent::QueuedRequest { request, .. }) =
|
||||
timeout(Duration::from_secs(1), connection.incoming_rx.recv()).await?
|
||||
else {
|
||||
anyhow::bail!("expected a queued JSON-RPC request");
|
||||
};
|
||||
assert_eq!(JSONRPCMessage::Request(request), message);
|
||||
|
||||
drop(connection);
|
||||
Ok(())
|
||||
|
||||
Reference in new issue
Block a user