feat: timer total turn metrics (#9382)

This commit is contained in:
jif-oai
2026-01-19 11:44:31 +01:00
committed by GitHub
parent a803467f52
commit 7ebe13f692
5 changed files with 11 additions and 3 deletions

View File

@@ -144,6 +144,12 @@ impl Session {
})
};
let timer = turn_context
.client
.get_otel_manager()
.start_timer("codex.turn.e2e_duration_ms", &[])
.ok();
let running_task = RunningTask {
done,
handle: Arc::new(AbortOnDropHandle::new(handle)),
@@ -151,6 +157,7 @@ impl Session {
task,
cancellation_token,
turn_context: Arc::clone(&turn_context),
_timer: timer,
};
self.register_new_active_task(running_task).await;
}