Skip to content

fix: make shutdown &self in span processor #1836

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
May 28, 2024

Conversation

TommyCpp
Copy link
Contributor

Related #1801

Changes

  • SpanProcessor::shutdown now takes a &self instead of &mut self

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)

Copy link

codecov bot commented May 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.8%. Comparing base (91397fc) to head (36fae4f).

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1836     +/-   ##
=======================================
- Coverage   73.8%   73.8%   -0.1%     
=======================================
  Files        122     122             
  Lines      19503   19503             
=======================================
- Hits       14406   14404      -2     
- Misses      5097    5099      +2     

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

@TommyCpp TommyCpp marked this pull request as ready for review May 27, 2024 22:46
@TommyCpp TommyCpp requested a review from a team May 27, 2024 22:46
@@ -26,6 +26,8 @@
asynchronously, it should clone the log data to ensure it can be safely processed without
lifetime issues.

- **Breaking** [1836](https://github.com/open-telemetry/opentelemetry-rust/pull/1836) `SpanProcessor::shutdown` now takes an immutable reference to self. Any reference can call shutdown on the processor. After the first call to `shutdown` the processor will not process any new spans.
Copy link
Member

Choose a reason for hiding this comment

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

I use Rewrap to keep comments wrapped!

@lalitb
Copy link
Member

lalitb commented May 28, 2024

This will allow us to add an explicit Shutdown method in TracerProvider, just like LoggerProvider?

@lalitb
Copy link
Member

lalitb commented May 28, 2024

This will allow us to add an explicit Shutdown method in TracerProvider, just like LoggerProvider?

ok got the answer here -#1801 (comment)

@cijothomas cijothomas merged commit 0ce6a6d into open-telemetry:main May 28, 2024
22 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.

3 participants