Skip to content

chore: update from opentelemetry-sdk 0.28.0 to 0.29.0 #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2025

Conversation

alessandrobologna
Copy link
Contributor

Motivation

This PR updates the dependencies from opentelemetry 0.28.0 to 0.29.0. The update requires adapting to breaking changes in the SpanExporter trait interface, which now requires immutable references (&self instead of &mut self) and uses async fn syntax rather than returning BoxFuture.

Solution

  • Updated opentelemetry dependencies from 0.28.0 to 0.29.0 in Cargo.toml
  • Updated all SpanExporter trait implementations in test files and examples to match the breaking changes in the 0.29.0 release:
    • Changed &mut self to &self in method signatures
    • Changed return type from BoxFuture<'static, OTelSdkResult> to using async fn that returns OTelSdkResult directly
    • Removed unnecessary BoxFuture imports
  • Updated CHANGELOG.md with the breaking change

The specific breaking changes in opentelemetry-sdk 0.29.0 that affected this crate are documented in the upstream changelog:

Breaking The SpanExporter::export() method no longer requires a mutable reference to self. Before:
async fn export(&mut self, batch: Vec<SpanData>) -> OTelSdkResult
After:
async fn export(&self, batch: Vec<SpanData>) -> OTelSdkResult

All tests and examples have been verified to build and run correctly with these changes.

@djc
Copy link
Collaborator

djc commented Mar 22, 2025

Thanks! Looks like we this might also need an MSRV adjustment...

@djc
Copy link
Collaborator

djc commented Mar 22, 2025

Thanks! Looks like we this might also need an MSRV adjustment...

Never mind, the MSRV was already high enough. Just fix the formatting!

@alessandrobologna
Copy link
Contributor Author

Sorry, I missed that, pushed another commit with the formatting fix. Thank you.

@djc djc merged commit 8ef39f7 into tokio-rs:v0.1.x Mar 22, 2025
1 check passed
@tisonkun
Copy link
Contributor

Can we have a release for this patch?

@djc
Copy link
Collaborator

djc commented Mar 23, 2025

Sure - can you submit a PR with a version bump?

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