core-agent-ide/codex-rs/tui
Owen Lin 3449e00bc9
feat(otel, core): record turn TTFT and TTFM metrics in codex-core (#13630)
### Summary
This adds turn-level latency metrics for the first model output and the
first completed agent message.
- `codex.turn.ttft.duration_ms` starts at turn start and records on the
first output signal we see from the model. That includes normal
assistant text, reasoning deltas, and non-text outputs like tool-call
items.
- `codex.turn.ttfm.duration_ms` also starts at turn start, but it
records when the first agent message finishes streaming rather than when
its first delta arrives.

### Implementation notes
The timing is tracked in codex-core, not app-server, so the definition
stays consistent across CLI, TUI, and app-server clients.

I reused the existing turn lifecycle boundary that already drives
`codex.turn.e2e_duration_ms`, stored the turn start timestamp in turn
state, and record each metric once per turn.

I also wired the new metric names into the OTEL runtime metrics summary
so they show up in the same in-memory/debug snapshot path as the
existing timing metrics.
2026-03-06 10:23:48 -08:00
..
frames Login flow polish (#3632) 2025-09-15 00:42:53 -07:00
src feat(otel, core): record turn TTFT and TTFM metrics in codex-core (#13630) 2026-03-06 10:23:48 -08:00
tests fix: package models.json for Bazel tests (#13129) 2026-02-28 17:21:02 +01:00
BUILD.bazel fix: package models.json for Bazel tests (#13129) 2026-02-28 17:21:02 +01:00
Cargo.toml tui: restore visible line numbers for hidden file links (#12870) 2026-02-26 10:29:54 +00:00
prompt_for_init_command.md chore: rename INIT.md to prompt_for_init_command.md and move closer to usage (#1886) 2025-08-06 11:58:57 -07:00
styles.md fix: stop using ANSI blue (#2421) 2025-08-18 16:02:25 +00:00
tooltips.txt Add /statusline tooltip entry (#12005) 2026-02-17 18:04:33 +00:00