OTEL metrics are gated on `analytics.enabled`, even for custom `otel.metrics_exporter` configurations
Open 💬 0 comments Opened Jun 4, 2026 by vascoccorreia
What issue are you seeing?
If analytics.enabled is false, a user's explicitly configured otel.metrics_exporter is overriden to None.
https://github.com/openai/codex/blob/main/codex-rs/core/src/otel_init.rs#L70-L77
What steps can reproduce the bug?
Set analytics.enabled to false, provide a custom otel.metrics_exporter, launch codex (e.g. the TUI).
What is the expected behavior?
I would expect analytics.enabled = false to disable exporting metrics to the default Statsig endpoint, but not gate metrics exporting to explicitly provided endpoints.
Additional information
_No response_