From e650d4b02c690751123b02f42330a848644c8484 Mon Sep 17 00:00:00 2001 From: jif-oai Date: Fri, 16 Jan 2026 18:33:14 +0100 Subject: [PATCH] feat: tool call duration metric (#9364) --- codex-rs/otel/src/traces/otel_manager.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/codex-rs/otel/src/traces/otel_manager.rs b/codex-rs/otel/src/traces/otel_manager.rs index 2b490bbb3..a1aaf0b51 100644 --- a/codex-rs/otel/src/traces/otel_manager.rs +++ b/codex-rs/otel/src/traces/otel_manager.rs @@ -446,6 +446,11 @@ impl OtelManager { 1, &[("tool", tool_name), ("success", success_str)], ); + self.record_duration( + "codex.tool.call.duration_ms", + duration, + &[("tool", tool_name), ("success", success_str)], + ); tracing::event!( tracing::Level::INFO, event.name = "codex.tool_result",