Send Codex telemetry
Send Codex OpenTelemetry data to SecureAuth Agent Authority to see token usage per user and per model
When you finish, you can see how many tokens each person uses in Codex, and on which models.
Codex sends this usage over OpenTelemetry (OTel) to SecureAuth Agent Authority's …/codex ingest endpoints, and it appears on the LLM Usage tab in Enforcement traffic and on the Cost and adoption page, where the gateway derives cost from those token counts using its model pricing.
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.
Next steps
- Enforcement traffic – see per-user and per-model token trends once data starts flowing.
- Telemetry – the full OpenTelemetry rollout model, including how to push configuration to every machine.