SecureAuth AI Gateway
IntegrationsOpenTelemetry

Codex

Send Codex telemetry to the gateway

Codex emits OpenTelemetry usage data. Point it at your gateway's …/codex ingest endpoints to populate LLM Usage analytics.

config.toml

Add the following to your Codex config.toml:

[otel]
environment = "prod"

[otel.exporter.otlp-http]
endpoint = "<endpoint>/codex/v1/logs"
protocol = "binary"
headers = { "Authorization" = "Bearer <token>" }

[otel.metrics_exporter.otlp-http]
endpoint = "<endpoint>/codex/v1/metrics"
protocol = "binary"
headers = { "Authorization" = "Bearer <token>" }

Replace <endpoint> with the OTLP endpoint shown when you created the ingest key (for example, https://telemetry.your-gateway-host/api/v1/telemetry) and <token> with the saai_ingest_… key.

Rolling it out org-wide

To enable telemetry for everyone automatically, mint one ingest key and ship this config.toml block to every developer machine through your provisioning or device-management tooling rather than asking each developer to edit their config by hand. See the OpenTelemetry overview for the full rollout model.

On this page