Measure total Guardian approval decision duration (#51330)

## What changed

Add `codex.guardian.decision.duration_ms` around the complete approval decision operation, including fast decisions, preparation, and cancellation alongside model review time.

GitOrigin-RevId: e5a8d5a3b9a0ff81e1b866be87b8f3a439ae6a1d
This commit is contained in:
jif
2026-10-06 10:39:52 +00:00
committed by copyberry
parent 6221a217e2
commit f5fa209bb0
@@ -66,6 +66,11 @@ impl<H: ReviewHost> ReviewRequest<'_, H> {
mut self,
registry: &ExtensionRegistry<C>,
) -> Option<ReviewDecision> {
// Include fast decisions, preparation and cancellation, not just model review time.
let _decision_timer = self
.telemetry
.start_timer("codex.guardian.decision.duration_ms", &[])
.ok();
let runtime = self.thread_store.get::<crate::ReviewerTasks>();
let _task = runtime.as_ref().map(|runtime| runtime.tasks.token());
if runtime