Skip to content

Conversation

@scottgerring
Copy link
Member

Fixes #2262

Changes

Changes SpanExporter trait methods from &mut self to &self:

  • shutdown(&self)
  • shutdown_with_timeout(&self, timeout)
  • force_flush(&self)

Also fixes shutdown() default timeout from 5 nanoseconds to 5 seconds to make it consistent with the others (assume this was a typo!).

Refactors TonicTracesClient to wrap inner in Mutex<Option<...>> for interior mutability, aligning its structure
and export pattern with TonicLogsClient and TonicMetricsClient.

This is breaking change - Implementers of SpanExporter must update method signatures. Those already using interior mutability are good.

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 16.66667% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.7%. Comparing base (65969fd) to head (9475348).

Files with missing lines Patch % Lines
opentelemetry-otlp/src/exporter/tonic/trace.rs 0.0% 26 Missing ⚠️
opentelemetry-otlp/src/exporter/http/trace.rs 0.0% 1 Missing ⚠️
opentelemetry-sdk/src/trace/export.rs 75.0% 1 Missing ⚠️
opentelemetry-sdk/src/trace/span_processor.rs 50.0% 1 Missing ⚠️
opentelemetry-stdout/src/trace/exporter.rs 0.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #3281     +/-   ##
=======================================
- Coverage   80.7%   80.7%   -0.1%     
=======================================
  Files        129     129             
  Lines      23210   23217      +7     
=======================================
  Hits       18748   18748             
- Misses      4462    4469      +7     

☔ 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.

@scottgerring scottgerring marked this pull request as ready for review December 5, 2025 12:00
@scottgerring scottgerring requested a review from a team as a code owner December 5, 2025 12:00
Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

Nice cleanups!

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.

Different Exporter::shutdown() interface across signals

2 participants