Track turn timing in ChatGPT telemetry#24144
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
aef2ab4 to
301b40c
Compare
45538b5 to
7c8290a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c8290a3ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| self.services | ||
| .analytics_events_client | ||
| .track_turn_timing(TurnTimingBreakdownFact { |
There was a problem hiding this comment.
Track timing for interrupted turns too
This only enqueues TurnTimingBreakdownFact on the normal completion path, but interrupted turns go through handle_task_abort, which emits TurnAborted/TurnCompleted with status Interrupted without ever calling track_turn_timing. In the common case where a user interrupts a turn after a model request has started, codex_turn_event will still be emitted by the app-server path but all the new timing fields remain absent, so the telemetry slice is systematically missing interrupted-turn timing.
Useful? React with 👍 / 👎.
7c8290a to
e6cefb6
Compare
ee5e068 to
8933b1c
Compare
98a44ea to
06d0b8a
Compare
ce1b920 to
b9ca2cf
Compare
06d0b8a to
9b3a2e3
Compare
970b926 to
a2b956b
Compare
ca9d577 to
c8eee6a
Compare
8c657ed to
bdda087
Compare
c8eee6a to
29314ca
Compare
bdda087 to
7424188
Compare
29314ca to
015f13f
Compare
7424188 to
8713ba0
Compare
015f13f to
cd69d8a
Compare
8713ba0 to
0ebd75f
Compare
cd69d8a to
212bdfa
Compare
0ebd75f to
94d2891
Compare
92815ef to
fb48903
Compare
81d4d94 to
33ac4ff
Compare
2d23da2 to
578811d
Compare
75c1117 to
52cfa94
Compare
82eec7a to
4a21957
Compare
cf508f7 to
5ffcaa1
Compare
4a21957 to
ad9ebd7
Compare
5ffcaa1 to
d562eb8
Compare
ad9ebd7 to
1ce1075
Compare
d562eb8 to
cceadf2
Compare
1ce1075 to
88ff700
Compare
cceadf2 to
77d29c0
Compare
88ff700 to
81ab8f6
Compare
77d29c0 to
89ad405
Compare
81ab8f6 to
53aad70
Compare
89ad405 to
5c78d1c
Compare
53aad70 to
2edafef
Compare
Why
This is the turn-specific slice of the ChatGPT telemetry stack. We want per-turn timing that breaks total turn time into request-start delay, sampling time, and blocking tool critical path, while keeping approval wait attributable to the turn without mixing in app-server or thread startup costs.
What changed
TurnTimingStateincodex-rs/coreto accumulate request-start delay, sampling duration, and blocking-tool critical-path duration across a turnTurnTimingBreakdownFactat turn completion and attach it tocodex_turn_eventapproval_wait_duration_msand derivefinalize_duration_msas the remainder after request start, sampling, and blocking tool timeVerification
cargo check -p codex-analytics -p codex-app-server -p codex-corejust fix -p codex-analytics -p codex-core