Telemetry (OpenTelemetry)

Stream Claude Code, Codex, GitHub Copilot, and Gemini CLI usage into SecureAuth Agent Authority via OpenTelemetry to power per-user LLM usage analytics.

In the Agent Authority console this page is labeled Telemetry.

Coding agents like Claude Code, Codex, GitHub Copilot, and Gemini CLI emit OpenTelemetry (OTLP) data about their model usage — tokens consumed, sessions, and requests. Point that telemetry at the gateway and all four power the LLM Usage analytics tab (per-user and per-model token trends) and the Cost page, across your whole organization. Claude Code reports list-price cost directly; for the others, which send token counts only, the gateway derives an API-equivalent figure from each model's published rates.

Telemetry page listing ingest API keys
The Telemetry page mints ingest keys that authorize agents to send OpenTelemetry data

Ingest keys

Open the Telemetry page and choose Create API key. The gateway returns:

  • an ingest key (saai_ingest_…) — shown once, so copy it immediately; and
  • an OTLP endpoint of the form https://telemetry.<your-gateway-host>/api/v1/telemetry.

Agents authenticate with the key as a bearer token (Authorization: Bearer saai_ingest_…) and post to a provider-specific path under that endpoint — …/claude for Claude, …/codex for Codex, …/copilot for Copilot, …/gemini for Gemini CLI. Revoke a key any time from the same page to cut off the agents using it.

The endpoint accepts gzip-compressed payloads, and answers every other compression with a 415. Whether an agent compresses is configured on the agent, not here: Claude Code sets it in its managed-settings env block.

Turning it on for everyone

Telemetry is configured agent-side, so the scalable path is to push the configuration to every machine rather than relying on each developer to set it up:

  1. Mint one ingest key for a fleet (for example, "Engineering laptops") on the Telemetry page.
  2. Distribute the agent configuration through your device-management tooling (MDM, fleet config, a provisioning script) so it applies to every user automatically:
    • Claude Code — ship the telemetry block in managed settings; managed settings apply to all users on the machine.
    • Codex — ship the config.toml telemetry block to each developer machine.
    • Copilot — ship the enterprise-managed settings telemetry block via MDM, and the ingest key in the environment for the CLI.
    • Gemini CLI — ship the .gemini/settings.json telemetry block to each developer machine.
  3. New machines pick up the configuration on enrollment, and usage starts flowing into LLM Usage analytics with no per-user steps.

Per-agent setup

Who can see the data

The LLM Usage tab in Analytics and the LLM usage card on the Dashboard are permission-gated: they render only for users whose role grants view_llm_analytics, and the analytics endpoints enforce the same permission. If telemetry is flowing but neither surface appears, check the role rather than the agent configuration.

Next steps

  • Analytics — see per-user and per-model token trends once data starts flowing.
  • Cost — API-equivalent value and real spend, once data starts flowing.
  • Dashboard — the LLM usage card lights up once telemetry is connected.

On this page