Skip to content

Conversation

@vyalamar
Copy link

@vyalamar vyalamar commented Nov 3, 2025

fix(otel): enable TLS for HTTPS OpenTelemetry gRPC endpoints

Context

The OpenTelemetry gRPC exporter was sending plaintext data to HTTPS endpoints because TLS was not enabled at build time and no runtime configuration existed.

Root cause

  • opentelemetry-otlp crate was compiled without the tls and tls-roots features
  • No call to ClientTlsConfig for HTTPS endpoints → fallback to cleartext transmission

Fix

  1. Cargo.toml — added "tls" and "tls-roots" features for opentelemetry-otlp
  2. otel_provider.rs — detect https:// endpoints and apply:
    let mut tls_config = ClientTlsConfig::new().with_native_roots();
    tls_config = tls_config.domain_name(domain);
    exporter_builder = exporter_builder.with_tls_config(tls_config);
    debug!("TLS enabled for HTTPS endpoint: {}", endpoint);

Impact

  • HTTPS endpoints now use encrypted TLS connections
  • Certificate validation via system root certs

Resolves: #6153 (OpenTelemetry HTTPS plaintext issue)

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@vyalamar
Copy link
Author

vyalamar commented Nov 3, 2025

I have read the CLA Document and I hereby sign the CLA

1 similar comment
@vyalamar
Copy link
Author

vyalamar commented Nov 3, 2025

I have read the CLA Document and I hereby sign the CLA

@vyalamar
Copy link
Author

vyalamar commented Nov 3, 2025

recheck

@vyalamar
Copy link
Author

vyalamar commented Nov 3, 2025

CLA :
I have read the CLA Document and I hereby sign the CLA.

@etraut-openai
Copy link
Collaborator

@vyalamar, thanks for the contribution!

I'm not sure what's going on with the CLA. No worries — I can see that you've accepted it, and I can override the automated check if needed.

There's a formatting-related issue that the CI scripts detected.

I've asked the developer who implemented the OTEL support in codex to review the PR. We should hear back from him soon.

@vyalamar
Copy link
Author

vyalamar commented Nov 4, 2025

Sure thanks. I will check and update this evening. And also this needs to work on dualstack so it can work on ipv4 and ipv6 alike . Let me address that as well.

@vyalamar
Copy link
Author

vyalamar commented Nov 4, 2025

I have read the CLA Document and I hereby sign the CLA.

@vyalamar vyalamar force-pushed the bugfix/open_telemetry_tls branch from 0f43c0e to efc9b42 Compare November 4, 2025 16:22
github-actions bot added a commit that referenced this pull request Nov 4, 2025
@vyalamar
Copy link
Author

vyalamar commented Nov 4, 2025

@etraut-openai and @haivanka — incorporated the runtime TLS wiring as discussed.

fix: enable TLS for HTTPS OpenTelemetry gRPC endpoints
@vyalamar vyalamar force-pushed the bugfix/open_telemetry_tls branch from f889c4f to 6690d82 Compare November 4, 2025 16:54
@etraut-openai
Copy link
Collaborator

@vyalamar, please review this PR which is a different (more complete) fix for this issue. I'm going to close this PR. Thanks again for analyzing the problem and proposing a fix!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2025
@openai openai unlocked this conversation Nov 4, 2025
youta7 added a commit to youta7/ta-codex that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants