[bug][otel]: OpenTelemetry gRPC exporter sends unencrypted data to HTTPS endpoint
Resolved 💬 6 comments Opened Nov 3, 2025 by haivanka Closed Nov 27, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.53.0
What subscription do you have?
Business
Which model were you using?
gpt-5-codex
What platform is your computer?
_No response_
What issue are you seeing?
Regarding OpenTelemetry export, I observed plain HTTP traffic being sent to my gRPC OpenTelemetry endpoint (using Wireshark), even though my endpoint url explicitly mentions https.
This is related to https://github.com/open-telemetry/opentelemetry-rust/issues/3182.
What steps can reproduce the bug?
- Set up a gRPC HTTPS endpoint in config.toml https://developers.openai.com/codex/security/#enable-otel-optin
- Run the Codex CLI
- Observe unecrypted outgoing traffic in Wireshark
What is the expected behavior?
_No response_
Additional information
_No response_
6 Comments
Root Cause Analysis
codex-otel builds opentelemetry-otlp without its tls feature. The TLS path in the tonic exporter is behind #[cfg(feature = "tls")] (see opentelemetry-otlp/src/exporter/tonic/mod.rs, also discussed in open-telemetry/opentelemetry-rust#3182). Without that feature, the exporter can’t create a TLS channel and falls back to cleartext, creating the security vulnerability reported.
Proposed Fix
The fix is a one-line change to codex-otel/Cargo.toml to enable the required feature:
@haivanka @codex-maintainers can you please assign this to me?
@haivanka, thanks for the bug report.
@vyalamar, thanks for the confirmation and analysis. We're interested in a fix if you'd like to post a PR.
@etraut-openai
I’ll prepare a PR for this shortly.
The patch will add the missing tls feature flag in codex-otel/Cargo.toml:
Will share the test results as well.
@vyalamar I did test it like that but it didn't work. Managed to get it working with this approach https://github.com/tensorzero/tensorzero/pull/3708.
@haivanka Great catch — thanks for linking the Tensorzero diff.
Looks like both layers are needed:
opentelemetry-otlp/tlsandtls-rootsso the tonic TLS client can build.ClientTlsConfig::new().with_enabled_roots()when constructing the exporter (as in your linked PR).I’ll adjust the PR to include both so the HTTPS OTLP path is fully encrypted out of the box.
@etraut-openai Fixed formatting issues.