Skip to content

Conversation

@lalitb
Copy link
Member

@lalitb lalitb commented Feb 5, 2025

Changes

The public API changes in Tracing:

  • Before:

      fn SpanExporter::export(&mut self, batch: Vec<SpanData>) -> BoxFuture<'static, ExportResult>;
      fn SpanExporter::shutdown(&mut self);
      fn SpanExporter::force_flush(&mut self) -> BoxFuture<'static, ExportResult>
      fn TraerProvider::shutdown(&self) -> TraceResult<()>
      fn TracerProvider::force_flush(&self) -> Vec<TraceResult<()>>
    • After:

        fn SpanExporter::export(&mut self, batch: Vec<SpanData>) -> BoxFuture<'static, OTelSdkResult>;
        fn SpanExporter::shutdown(&mut self) -> OTelSdkResult;
        fn SpanExporter::force_flush(&mut self) -> BoxFuture<'static, OTelSdkResult>
        fn TraerProvider::shutdown(&self) -> OTelSdkResult;
        fn TracerProvider::force_flush(&self) -> OTelSdkResult;

Please provide a brief description of the changes here.

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)

@lalitb lalitb requested a review from a team as a code owner February 5, 2025 03:54
@codecov
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 52.53165% with 75 lines in your changes missing coverage. Please review.

Project coverage is 79.0%. Comparing base (0e751b4) to head (7362e0b).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-otlp/src/exporter/http/trace.rs 0.0% 24 Missing ⚠️
opentelemetry-zipkin/src/exporter/uploader.rs 0.0% 16 Missing ⚠️
opentelemetry-otlp/src/exporter/tonic/trace.rs 0.0% 10 Missing ⚠️
opentelemetry-sdk/src/trace/span_processor.rs 66.6% 8 Missing ⚠️
...sdk/src/trace/span_processor_with_async_runtime.rs 78.9% 4 Missing ⚠️
opentelemetry-stdout/src/trace/exporter.rs 0.0% 4 Missing ⚠️
opentelemetry-sdk/src/trace/export.rs 60.0% 2 Missing ⚠️
opentelemetry-zipkin/src/exporter/mod.rs 0.0% 2 Missing ⚠️
opentelemetry-otlp/src/span.rs 0.0% 1 Missing ⚠️
...ntelemetry-sdk/src/testing/trace/span_exporters.rs 91.6% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2613     +/-   ##
=======================================
- Coverage   79.1%   79.0%   -0.2%     
=======================================
  Files        118     118             
  Lines      22508   22550     +42     
=======================================
+ Hits       17821   17830      +9     
- Misses      4687    4720     +33     

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

@lalitb
Copy link
Member Author

lalitb commented Feb 5, 2025

@cijothomas I have update the PR desc with breaking SDK changes as part of this PR, to make it consistent with logs and metrics. Also updated the changelog accordingly. Please have a look, as this would need to be added in the migration guide.

@cijothomas
Copy link
Member

@cijothomas I have update the PR desc with breaking SDK changes as part of this PR, to make it consistent with logs and metrics. Also updated the changelog accordingly. Please have a look, as this would need to be added in the migration guide.

Thanks. This is good for changelog purposes.
I'll send the migration guide's draft PR soon, and we can see if that makes it easier to migrate. The changelog, while good, is not likely to help users given the changelog are spread across multiple crates etc. Most users won't care about export() method returning a diff. result, but might care for shutdown.

@lalitb lalitb merged commit d01c113 into open-telemetry:main Feb 5, 2025
20 of 21 checks passed
bantonsson pushed a commit to bantonsson/opentelemetry-rust that referenced this pull request Oct 9, 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.

2 participants