Skip to content

Add Statsig counters for exec_command latency - #62507

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4bf6dc628bca5758999bf0ed5f67051f870a61e8
Nov 19, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4bf6dc628bca5758999bf0ed5f67051f870a61e8

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Add Statsig counters for exec_command latency

Why

Dividing total handler time by the call count gives a per-call mean
without averaging histogram export batches.

What changed

Record codex.exec_command.duration_total_ms and
codex.exec_command.calls for built-in exec_command handler runs,
including failures. Measure from handler entry through command exit or
the first yield, including shell setup and startup. Exclude calls rejected
before the handler runs and retain tags such as shell_snapshot_mode,
success, and product_sku when available.

Testing

Cover Statsig export of both counters and check that their counts and
duration totals match the tool duration histogram for eligible calls
within each tag set.

## Why

Dividing total handler time by the call count gives a per-call mean
without averaging histogram export batches.

## What changed

Record `codex.exec_command.duration_total_ms` and
`codex.exec_command.calls` for built-in `exec_command` handler runs,
including failures. Measure from handler entry through command exit or
the first yield, including shell setup and startup. Exclude calls rejected
before the handler runs and retain tags such as `shell_snapshot_mode`,
`success`, and `product_sku` when available.

## Testing

Cover Statsig export of both counters and check that their counts and
duration totals match the tool duration histogram for eligible calls
within each tag set.

GitOrigin-RevId: 4bf6dc628bca5758999bf0ed5f67051f870a61e8
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/4bf6dc628bca5758999bf0ed5f67051f870a61e8 branch from 44c7930 to 39c29c3 Compare November 19, 2026 13:19
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-19T13:19:13.911970Z 44c7930 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 39c29c3 into main Nov 19, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/4bf6dc628bca5758999bf0ed5f67051f870a61e8 branch November 19, 2026 13:19
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 39c29c3b Deployed Nov 19, 2026 by Dionisos-Galanis via Generate label suggestions #64394
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.