Skip to content

Conversation

@noahdormann
Copy link
Contributor

@noahdormann noahdormann commented Jan 22, 2026

The generic tls feature currently enables tonic/tls-ring, which implicitly selects the ring rustls crypto provider.
This makes it difficult or impossible for downstream users to use alternative rustls providers such as aws-lc, and can lead to feature unification conflicts when combined with other TLS-enabled dependencies.

This PR deprecates the generic tls feature and introduces explicit tls-ring and tls-aws-lc features, exposing both underlying tonic TLS options and allowing consumers to consistently select a single rustls crypto provider.

Motivation

Rustls 0.23 requires a single, unambiguous crypto provider (ring or aws-lc).
Because Cargo features are additive, the existing tls feature could silently force ring even when users explicitly opted into aws-lc elsewhere, resulting in runtime panics during TLS initialization.

Providing explicit TLS feature flags avoids this class of failure and aligns with tonic’s provider model.

Changes

  • Deprecate the existing tls feature
  • Introduce:
    • tls-ring → enables tonic/tls-ring
    • tls-aws-lc → enables tonic/tls-aws-lc
  • Update documentation to recommend selecting exactly one TLS feature

Migration

Users currently relying on tls should switch to one of:

features = ["tls-ring"]

or

features = ["tls-aws-lc"]

The deprecated tls feature remains temporarily for compatibility but should not be used in new configurations.

Caveat

The feature tls-roots and tls-webpki-roots can no longer explicitly enable tls. This could lead to issues with users that relied on this impicit feature map.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@noahdormann noahdormann requested a review from a team as a code owner January 22, 2026 13:24
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 22, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: noahdormann / name: Noah Dormann (b27be42)

@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.4%. Comparing base (e5f602e) to head (b27be42).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3323   +/-   ##
=====================================
  Coverage   81.4%   81.4%           
=====================================
  Files        128     128           
  Lines      23742   23742           
=====================================
+ Hits       19328   19332    +4     
+ Misses      4414    4410    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

LGTM, with updated changelog

@lalitb lalitb mentioned this pull request Feb 3, 2026
4 tasks
…-lc`

The generic `tls` feature enabled `tonic/tls-ring`, which made it
harder to use alternative rustls crypto providers (e.g. aws-lc).

This change deprecates `tls` and introduces explicit `tls-ring` and
`tls-aws-lc` features so both underlying tonic features are exposed.
@noahdormann
Copy link
Contributor Author

@lalitb Thank you for your review. I have amended the commit with the updated changelog.

@lalitb lalitb merged commit 1b7ad3f into open-telemetry:main Feb 4, 2026
27 checks passed
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.

2 participants