Skip to content

[codex] Initialize exec-server OpenTelemetry at startup#25019

Merged
richardopenai merged 2 commits into
mainfrom
starr/cca-exec-logging
Jun 18, 2026
Merged

[codex] Initialize exec-server OpenTelemetry at startup#25019
richardopenai merged 2 commits into
mainfrom
starr/cca-exec-logging

Conversation

@starr-openai

@starr-openai starr-openai commented May 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Initialize stderr tracing and the configured OpenTelemetry provider for local and remote codex exec-server startup.
  • Instrument the local and remote server entrypoints with a root runtime span.
  • Keep raw Noise environment, registration, and stream identifiers out of exported spans while preserving them in local debug events.
  • Keep telemetry setup in a focused CLI module instead of growing the top-level command entrypoint.

Stack

Validation

  • just test -p codex-exec-server --lib (139 passed)
  • just test -p codex-cli --test exec_server (3 passed)
  • just bazel-lock-check
  • just fix -p codex-exec-server -p codex-cli
  • just fmt

@starr-openai starr-openai force-pushed the starr/cca-exec-logging branch from c8ab9d0 to 4282a6e Compare May 29, 2026 19:07
@starr-openai starr-openai marked this pull request as ready for review May 29, 2026 22:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4282a6e28b

ℹ️ 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".

Comment thread codex-rs/exec-server/src/local_process.rs Outdated
starr-openai added a commit that referenced this pull request May 29, 2026
starr-openai added a commit that referenced this pull request Jun 1, 2026
Comment thread codex-rs/exec-server/src/server/processor.rs Outdated
Comment thread codex-rs/exec-server/src/remote.rs Outdated
Comment thread codex-rs/exec-server/src/server/processor.rs Outdated
Comment thread codex-rs/memories/write/src/extensions/ad_hoc.rs
Comment thread codex-rs/exec-server/src/remote.rs Outdated
Comment thread codex-rs/exec-server/src/remote.rs Outdated
@richardopenai richardopenai force-pushed the starr/cca-exec-logging branch from d0265f4 to db44d86 Compare June 3, 2026 08:10
@richardopenai richardopenai changed the base branch from main to codex/otel-metric-instruments June 3, 2026 08:11
@richardopenai richardopenai force-pushed the codex/otel-metric-instruments branch 2 times, most recently from 4b17850 to a107f7b Compare June 8, 2026 21:19
Base automatically changed from codex/otel-metric-instruments to main June 8, 2026 22:29
@richardopenai richardopenai force-pushed the starr/cca-exec-logging branch from db44d86 to bf4be25 Compare June 10, 2026 21:00
@richardopenai richardopenai changed the title Add exec-server OTEL lifecycle logging [codex] Initialize exec-server OpenTelemetry at startup Jun 10, 2026
@richardopenai richardopenai changed the base branch from main to codex/otel-duration-seconds June 10, 2026 21:01
@richardopenai richardopenai marked this pull request as draft June 10, 2026 21:01
@richardopenai richardopenai marked this pull request as ready for review June 10, 2026 21:12
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Review source: Codex Cloud Agents (CCA)

Codex Cloud Agents (CCA) couldn't complete this review. The original Codex Review is unaffected.

@richardopenai richardopenai force-pushed the codex/otel-duration-seconds branch 3 times, most recently from 476dffc to b021458 Compare June 15, 2026 17:11
richardopenai added a commit that referenced this pull request Jun 16, 2026
## Why

Exec-server request and connection latencies need fractional-second
histograms. The existing duration API records integer milliseconds and
uses millisecond-scale buckets.

## What changed

- Adds a described duration API that records `Duration` values as
fractional seconds.
- Uses second-scale explicit histogram boundaries.
- Caches duration histograms by name, unit, and description, matching
the existing instrument caching model.
- Covers exact boundaries, representative bucket placement, fractional
sums, and exported metadata.

This PR only adds the duration primitive. It does not add exec-server
adoption.

## Stack

1. #26091: counter descriptions
2. #27057: gauge instruments
3. **#27058: second-based duration histograms**
4. #25019: initialize exec-server OpenTelemetry at startup

Related independent coverage: #27059 tests OTLP HTTP log and trace event
export.

## Validation

- `just test -p codex-otel`
Base automatically changed from codex/otel-duration-seconds to main June 16, 2026 00:10
zswang-oai pushed a commit that referenced this pull request Jun 16, 2026
## Why

Exec-server request and connection latencies need fractional-second
histograms. The existing duration API records integer milliseconds and
uses millisecond-scale buckets.

## What changed

- Adds a described duration API that records `Duration` values as
fractional seconds.
- Uses second-scale explicit histogram boundaries.
- Caches duration histograms by name, unit, and description, matching
the existing instrument caching model.
- Covers exact boundaries, representative bucket placement, fractional
sums, and exported metadata.

This PR only adds the duration primitive. It does not add exec-server
adoption.

## Stack

1. #26091: counter descriptions
2. #27057: gauge instruments
3. **#27058: second-based duration histograms**
4. #25019: initialize exec-server OpenTelemetry at startup

Related independent coverage: #27059 tests OTLP HTTP log and trace event
export.

## Validation

- `just test -p codex-otel`
@richardopenai richardopenai force-pushed the starr/cca-exec-logging branch from bf4be25 to 129a501 Compare June 16, 2026 19:21
Comment thread codex-rs/cli/src/main.rs
Comment thread codex-rs/cli/src/exec_server_telemetry.rs Outdated
@richardopenai richardopenai requested a review from anp-oai June 17, 2026 19:17
@richardopenai richardopenai merged commit 4c7228e into main Jun 18, 2026
31 checks passed
@richardopenai richardopenai deleted the starr/cca-exec-logging branch June 18, 2026 18:03
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 18, 2026
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.

3 participants