feat: Bump MSRV to 1.85 and replace 3rd party crates with std library APIs#3352
feat: Bump MSRV to 1.85 and replace 3rd party crates with std library APIs#3352bryantbiggs wants to merge 6 commits intoopen-telemetry:mainfrom
1.85 and replace 3rd party crates with std library APIs#3352Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3352 +/- ##
=======================================
- Coverage 82.2% 80.9% -1.4%
=======================================
Files 128 132 +4
Lines 24626 25165 +539
=======================================
+ Hits 20266 20377 +111
- Misses 4360 4788 +428 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ge to propagate changes from single source
1.80 and replace 3rd party crates with std library APIs1.85 and replace 3rd party crates with std library APIs
32c1e82 to
3866288
Compare
3866288 to
eeb4e9b
Compare
| version is 1.75. The current OpenTelemetry version is not guaranteed to build | ||
| on Rust versions earlier than the minimum supported version. | ||
|
|
||
| The current stable Rust compiler and the three most recent minor versions |
There was a problem hiding this comment.
lets keep the policy documented in the main readme.md
There was a problem hiding this comment.
sure, I will re-add. I will say, its a rather odd and confusing statement though. MSRV means the min version specified is the minimum - not the minimum -3 versions
There was a problem hiding this comment.
This is just listing our policy - we don't require rust version newer than the current-3.
Can use a rewrite for conveying the intent clearly, but in a separate PR.
|
Could we have bumped to 1.80 and still used the std library APIs? |
that was the original intent, but and given that edition 2024 requires 1.85+ I thought the jump was worthwhile. Changing to edition 2024 was not included since that will probably have a few clippy lint changes for the syntax and would be better suited for a follow up PR |
Historically , this project was quite defensive about bumping rust version. Officially we only promised current/current-3, but we were quite conservative and support much older rust version. |
|
@open-telemetry/rust-approvers Please comment if there are any major concerns about this bump. We can leave this open for 2-3 days to get feedbacks. |
I tend to be cautious about MSRV bumps unless they’re driven by a security issue or a hard blocking dependency. This is especially important for I’m supportive of the dependency cleanup overall. If possible, it would be great to scope the bump so that core crates like |
Resolves 6 TODO comments in opentelemetry-sdk that were waiting for LazyLock stabilization (stable since Rust 1.80). Each OnceLock paired with a getter function is now a single LazyLock static declaration. Signed-off-by: Bryant Biggs <[email protected]>
|
looks like I missed some TODOs that were waiting for LAZYLOCK support - addressed in last commit. I understand the resistance to disrupt users, theres always a natural tension between staying current and the least friction for users. I used CLAUDE to summarize the additional gains that could be realized if 1.85 and rust edition 2024 were supported (again, edition 2024 would be a separate PR) What MSRV 1.85 unlocks next
|
I appreciate the dependency cleanup, but I have a timing concern. Traces and the OTLP exporters are still Beta/RC. If we bump MSRV now, users pinned to older toolchains will be stranded on a release that isn't yet a complete solution across all signals. I'd suggest we stabilize those first, so anyone who can't follow the toolchain bump at least has something solid to stay on. Can we revisit this after the Traces/OTLP stabilization milestone? |
|
I am using and most interested in the OTLP exporter, so if there are areas where I might be able to help
I can certainly try to help with the stabilization since the OTLP exporter is what I am using and most interested in improving |
|
|
I haven't reviewed this, but wanted to share my high level thoughts:
|
Propose replacing the current N-3 version-count MSRV policy with a 12-month trailing window. The MSRV may be raised to any stable Rust release that is at least 12 months old. This is more conservative than the 6-month policy used by tokio, hyper, and tower, reflecting opentelemetry-rust's role as infrastructure. Motivated by the discussion in open-telemetry#3352.
|
Following up on the feedback here — I've drafted an ADR proposing a formal MSRV policy in #3361. It proposes a 12-month trailing window (twice as conservative as tokio/hyper/tower's 6-month policy) and includes ecosystem research across both the Rust ecosystem and other OTel language SDKs. Would appreciate any feedback there before revisiting the MSRV bump itself. |
apologies, its the I guess this wasn't shown because of the Cargo resolution changes on edition 2024 (not certain). So the current version of the |
Fixes #
Design discussion issue (if applicable) #
Changes
once_celllazy_staticnum-formatnum_cpusMerge requirement checklist
CHANGELOG.mdfiles updated for non-trivial, user-facing changes