Skip to content

Codex CLI

OpenAI's Codex CLI has native OpenTelemetry support.

Automatic Setup

bash
flowstate-telemetry install --tool codex-cli

This configures the [otel] section in ~/.codex/config.toml.

Manual Setup

Add the following to ~/.codex/config.toml:

toml
[otel]
endpoint = "https://otel.flowstate.inc"
api_key = "YOUR_TELEMETRY_KEY"

To enable prompt capture, add:

toml
[otel]
endpoint = "https://otel.flowstate.inc"
api_key = "YOUR_TELEMETRY_KEY"
log_user_prompt = true

What Gets Captured

EventData Collected
PromptsPrompt text (if log_user_prompt enabled), session ID
API requestsModel, input/output tokens, cost, duration
Tool resultsTool name, success/failure
File operationsFiles modified, lines changed

Limitations

  • Prompt capture is opt-in (--prompts flag or log_user_prompt = true)

Flowstate Documentation