Switch it on
Add an [otel] block to ~/.codex/config.toml. Codex ships the exporter and leaves it
switched off; every turn then arrives as logs, one record per event, with the token counts on
each completed response. The endpoint is used exactly as written, so name the logs path
yourself.
[otel]
environment = "production"
log_user_prompt = false
[otel.exporter.otlp-http]
endpoint = "https://ingestion.eu.bronto.io/v1/logs"
protocol = "binary"
[otel.exporter.otlp-http.headers]
x-bronto-api-key = "<BRONTO_API_KEY>"
Codex does not expand $VAR in a header value, so the key goes in literally.
[otel]
environment = "production"
log_user_prompt = false
[otel.exporter.otlp-http]
endpoint = "http://localhost:4318/v1/logs"
protocol = "binary"
This assumes a Collector listening on localhost:4318; the
Local Collector setup shows how to start one.
This uses the endpoint and auth header you saved in the setup guide.
[otel]
environment = "production"
log_user_prompt = false
[otel.exporter.otlp-http]
endpoint = "YOUR_OTLP_ENDPOINT/v1/logs"
protocol = "binary"
[otel.exporter.otlp-http.headers]
YOUR_AUTH_HEADER = "YOUR_AUTH_VALUE"