Send Codex telemetry to Agent Authority

Send Codex OpenTelemetry token and session data to SecureAuth Agent Authority for per-user and per-model LLM usage analytics.

Codex emits OpenTelemetry usage data — tokens and sessions per user. Point it at your gateway's …/codex ingest endpoints to populate the LLM Usage tab in Analytics, 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

  • Analytics — see per-user and per-model token and cost trends once data starts flowing.
  • Telemetry — the full OpenTelemetry rollout model, including how to push configuration to every machine.

On this page