Add app-server event tracing (#12695)

To help with debugging
This commit is contained in:
pakrym-oai
2026-02-24 14:45:50 -08:00
committed by GitHub
parent ee1520e79e
commit 5571a022eb
3 changed files with 16 additions and 1 deletions

View File

@@ -5899,6 +5899,11 @@ impl CodexMessageProcessor {
EventMsg::TurnComplete(_) => "task_complete",
_ => &event.msg.to_string(),
};
let request_event_name = format!("codex/event/{event_formatted}");
tracing::trace!(
conversation_id = %conversation_id,
"app-server event: {request_event_name}"
);
let mut params = match serde_json::to_value(event.clone()) {
Ok(serde_json::Value::Object(map)) => map,
Ok(_) => {
@@ -5933,7 +5938,7 @@ impl CodexMessageProcessor {
.send_notification_to_connections(
&subscribed_connection_ids,
OutgoingNotification {
method: format!("codex/event/{event_formatted}"),
method: request_event_name,
params: Some(params.into()),
},
)