✨ Software.com is now Antenna. Read more →
Skip to Content
IntegrationsAIChatGPT (OpenTelemetry)

ChatGPT (OpenTelemetry)

The local ChatGPT agent runtime can export OpenTelemetry  logs and metrics for every conversation. This covers local agent work in the ChatGPT desktop app, the Codex CLI, and the Codex IDE extension, which all read the same [otel] configuration. Antenna uses this telemetry to report individual sessions, including tokens, estimated cost, tool and MCP calls, skills, and whether the session edited code.

ChatGPT (OpenTelemetry) is its own source. It works alongside the ChatGPT daily usage connection and does not replace it.

Only agent work that runs on the developer’s machine produces OpenTelemetry. ChatGPT chats run in the cloud, so they are reported by the ChatGPT source instead.

Setup

Generate your configuration in Antenna

  1. In Antenna, go to Settings > Sources > Add source.
  2. Search for ChatGPT and open ChatGPT (OpenTelemetry).
  3. Click Generate configuration.
  4. Copy the generated [otel] block. It contains a token for your organization, so store it like a secret.

The block looks like this:

[otel] environment = "prod" log_user_prompt = false exporter = { otlp-http = { endpoint = "https://app.antenna.dev/api/v1/otel/chatgpt/logs", protocol = "json", headers = { "authorization" = "Bearer <token>" } } } metrics_exporter = { otlp-http = { endpoint = "https://app.antenna.dev/api/v1/otel/chatgpt/metrics", protocol = "json", headers = { "authorization" = "Bearer <token>" } } } trace_exporter = "none"

OpenAI’s observability and telemetry  guide explains what each setting does, and the configuration reference  lists every [otel] key.

Deploy it with managed configuration

Deploy the block with OpenAI’s managed configuration  so every developer’s desktop app, CLI, and IDE extension sends the same settings. Use one of these:

  • Agent security in the ChatGPT Admin Console, with Edit as TOML. No local file is needed.
  • managed_config.toml on each device (/etc/codex/managed_config.toml on macOS and Linux, ~/.codex/managed_config.toml on Windows).
  • A macOS MDM profile, such as Jamf or Kandji, with the base64-encoded block in config_toml_base64 under the com.openai.codex domain.

For a single machine, add the block to ~/.codex/config.toml. Restart the ChatGPT desktop app or Codex after changing the configuration.

You can return to the block at any time from Settings > Sources > ChatGPT (OpenTelemetry) > View configuration.

Do not set [analytics] enabled = false in the same configuration. That setting also turns off custom OTLP metrics exporters, so Antenna stops receiving metrics.

What’s tracked

Telemetry is grouped by conversation.id. Antenna treats each conversation as one session and attributes it to the developer by their ChatGPT account.

DataSource event or metric
Session start and endAll log events in the conversation
Prompts sentcodex.user_prompt (prompt length only)
Input and output tokens, modelcodex.sse_event with response.completed
Estimated costcodex.turn_cost
Tool calls, MCP calls, and code editscodex.tool_result and codex.tool_decision
Skillscodex.skill_invocation
Token, tool, and turn metricscodex.turn.token_usage, codex.tool.call, codex.mcp.call, and related metrics

The telemetry does not report lines changed, commits, or pull requests. A session counts as editing code when an apply_patch tool call succeeds.

Privacy

Antenna removes sensitive content as soon as an export arrives:

  • Prompts: keep log_user_prompt = false. If prompt text arrives anyway, Antenna drops it and keeps only its length.
  • Tool output and arguments: dropped from codex.tool_result and codex.tool_decision, because they can contain source code.
  • Assistant responses and raw API bodies: never stored.

Antenna keeps only an allowlist of event fields. Log events are not stored in Antenna’s database. Each one is forwarded to Antenna’s analytics pipeline as soon as it is filtered. The only log value Antenna’s database keeps is each developer’s email address, used to match users to people in Antenna. Metric exports are stored encrypted at rest until they are processed and deleted 30 days later. Traces are not collected, so trace_exporter stays "none".

Troubleshooting

SymptomFix
No sessions appearConfirm the [otel] block is in the configuration the client loads, and that both endpoints use protocol = "json". Restart the desktop app or Codex after changing it.
Logs arrive but metrics do notRemove [analytics] enabled = false, which disables custom metrics exporters.
Requests are rejected with 401The token is missing or no longer valid. Copy the block again from View configuration.
Requests are rejected with 403The ChatGPT (OpenTelemetry) source was deactivated. Reconnect it in Settings > Sources.
Last updated on