Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion opentelemetry-otlp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ zstd-tonic = ["tonic/zstd"]
# http compression
gzip-http = ["flate2"]
zstd-http = ["zstd"]
tls = ["tonic/tls-ring"]
tls = []
Copy link
Member

@scottgerring scottgerring Oct 14, 2025

Choose a reason for hiding this comment

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

The tonic feature flags impl referenced:

_tls-any = ["dep:tokio", "tokio?/rt", "tokio?/macros", "tls-connect-info"] # Internal. Please choose one of `tls-ring` or `tls-aws-lc`
tls-ring = ["_tls-any", "tokio-rustls/ring"]
tls-aws-lc = ["_tls-any", "tokio-rustls/aws-lc-rs"]

I believe the intention is that "_tls-any" is an "internal" feature, not something the user is intended to rely on, and is what's then used to guard the backend-independent TLS code.

With this in mind, and with an eye to maintaining backward compatibility, how about:

_tls-any = []  # Internal feature for TLS guards
tls-ring = ["_tls-any", "tonic/tls-ring"]    # User opts into ring
tls-aws-lc = ["_tls-any", "tonic/tls-aws-lc"] # User opts into aws-lc
tls = ["tls-ring"]  # Default to existing behaviour 

This would need code changes too to move from tls to _tls-any in the feature guards - e.g. a bunch of stuff in exporter/tonic/mod:

#[cfg(feature = "tls")]
use tonic::transport::ClientTlsConfig;

Copy link
Member

Choose a reason for hiding this comment

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

As this suggestion stretches the scope a little here, it would be great if one of the others piped in - @lalitb @bantonsson , does this seem reasonable to you?

tls-aws-lc = ["tls", "tonic/tls-aws-lc"]
tls-ring = ["tls", "tonic/tls-ring"]
tls-roots = ["tls", "tonic/tls-native-roots"]
tls-webpki-roots = ["tls", "tonic/tls-webpki-roots"]

Expand Down
Loading