Emit turn cost telemetry for ChatGPT sessions - #41944
Merged
copyberry[bot] merged 1 commit intoSep 1, 2026
Merged
Conversation
## What changed - Query workspace-visible turn estimates for ChatGPT-authenticated sessions through the appropriate Codex or ChatGPT endpoint. - Track completed response IDs and emit `codex.turn.cost_microusd` only when the estimate is nonnegative, visible, and covers every observed response. - Keep error response bodies out of turn-cost worker logs. ## Testing - Cover both endpoint styles, nullable estimates, settlement validation, exact micro-USD conversion, and response-ID tracking. - Add an app-server integration test that verifies a settled ChatGPT turn reaches the OTLP metrics exporter with its turn, conversation, and auth-mode attributes. GitOrigin-RevId: 6ae3f8df729fad52984a0c6efafd8c96c7214e55
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/6ae3f8df729fad52984a0c6efafd8c96c7214e55
branch
from
September 1, 2026 00:31
080df96 to
e39ab0c
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/6ae3f8df729fad52984a0c6efafd8c96c7214e55
branch
September 1, 2026 00:32
maekawataiki
temporarily deployed
to
issue-triage
September 1, 2026 00:42 — with
GitHub Actions
Inactive
maekawataiki
temporarily deployed
to
issue-triage
September 1, 2026 00:42 — with
GitHub Actions
Inactive
maekawataiki
temporarily deployed
to
issue-triage
September 1, 2026 00:42 — with
GitHub Actions
Inactive
maekawataiki
temporarily deployed
to
issue-triage
September 1, 2026 00:43 — with
GitHub Actions
Inactive
majaflow
temporarily deployed
to
issue-triage
September 1, 2026 00:44 — with
GitHub Actions
Inactive
majaflow
temporarily deployed
to
issue-triage
September 1, 2026 00:44 — with
GitHub Actions
Inactive
majaflow
temporarily deployed
to
issue-triage
September 1, 2026 00:44 — with
GitHub Actions
Inactive
majaflow
temporarily deployed
to
issue-triage
September 1, 2026 00:45 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Emit turn cost telemetry for ChatGPT sessions
What changed
codex.turn.cost_microusdonly when the estimate is nonnegative, visible, and covers every observed response.Testing