OpenAI Codex
OpenAI Codex has native OpenTelemetry support. Once enabled, Oodle collects metrics and event logs so you can track token usage, session activity, tool calls, and WebSocket request patterns across your organization.
Getting Started
1. Enable Telemetry
The fastest way is to use the integration tile in the Oodle UI:
- Navigate to Settings → Integrations
- Open the AI Agent Observability section
- Click the Codex Observability tile
- Select an API key and follow the steps shown
Alternatively, add the following to your Codex
configuration file (~/.codex/config.toml):
#:schema https://developers.openai.com/codex/config-schema.json
[otel]
environment = "production"
log_user_prompt = true
exporter = { otlp-http = {
endpoint = "https://<LOGS_ENDPOINT>/ingest/otel/v1/logs",
protocol = "binary",
headers = {
"X-API-KEY" = "<API_KEY>",
"X-OODLE-INSTANCE" = "<INSTANCE_ID>",
},
}}
metrics_exporter = { otlp-http = {
endpoint = "https://<METRICS_ENDPOINT>/v2/otlp/metrics/<INSTANCE_ID>",
protocol = "binary",
headers = {
"X-API-KEY" = "<API_KEY>",
"X-OODLE-INSTANCE" = "<INSTANCE_ID>",
},
}}
Replace <METRICS_ENDPOINT>, <API_KEY>, and
<INSTANCE_ID> with values from the integration tile.
The integration tile in the Oodle UI generates a
ready-to-copy config.toml with the correct
endpoints and API key pre-filled.
Alternative: Environment Variables
For quick testing you can export the standard OpenTelemetry variables directly in your shell:
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://<METRICS_ENDPOINT>/v2/otlp/metrics/<INSTANCE_ID>
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://<LOGS_ENDPOINT>/ingest/otel/v1/logs
export OTEL_EXPORTER_OTLP_HEADERS="X-API-KEY=<API_KEY>, X-OODLE-INSTANCE=<INSTANCE_ID>"
export OTEL_LOG_USER_PROMPTS=1
export OTEL_METRIC_EXPORT_INTERVAL=10000
export OTEL_LOGS_EXPORT_INTERVAL=5000
2. Roll Out to Your Team
Commit the config.toml above to your dotfiles
repository or place it in each developer's
~/.codex/ directory via your configuration
management tool.