Skip to content
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

fix: Remove mut ref requirement for shutdown LogExporter #2764

Merged

Conversation

cijothomas
Copy link
Member

@cijothomas cijothomas commented Mar 5, 2025

Redoing https://github.com/open-telemetry/opentelemetry-rust/pull/2634/files

LogExporter shutdown() no longer require mut ref. The component that needs mutability should rely on interior mutability. Most of the exporters already use interior mutability.

Metric already does not require mutable self on shutdown, this makes Logs consistent with that, and later we need to get Traces too.

Also LogProcessor, LogProvider does not require mut ref on shutdown, so this makes exporter aligned as well.

Additionally this also fixes #2770

Copy link

codecov bot commented Mar 8, 2025

Codecov Report

Attention: Patch coverage is 16.00000% with 21 lines in your changes missing coverage. Please review.

Project coverage is 79.7%. Comparing base (9d3a507) to head (7a0024e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-otlp/src/exporter/tonic/logs.rs 0.0% 13 Missing ⚠️
opentelemetry-otlp/src/logs.rs 0.0% 5 Missing ⚠️
opentelemetry-otlp/src/exporter/http/logs.rs 0.0% 1 Missing ⚠️
opentelemetry-sdk/src/logs/export.rs 0.0% 1 Missing ⚠️
opentelemetry-stdout/src/logs/exporter.rs 0.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2764     +/-   ##
=======================================
- Coverage   79.7%   79.7%   -0.1%     
=======================================
  Files        123     123             
  Lines      23107   23115      +8     
=======================================
  Hits       18426   18426             
- Misses      4681    4689      +8     

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

Copy link
Contributor

@utpilla utpilla left a comment

Choose a reason for hiding this comment

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

Looks good for now. The shutdown logic for tonic export can be implemented later.

Co-authored-by: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com>
@cijothomas cijothomas merged commit 68c9133 into open-telemetry:main Mar 10, 2025
22 of 23 checks passed
@cijothomas cijothomas deleted the cijothomas/log-shutdown-remove-mut branch March 10, 2025 21:58
@cijothomas
Copy link
Member Author

@gruebel Merged this to unblock progress! Please share any feedback on this, and I'll follow up.

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.

LogExporter not invoking shutdown on the client.
3 participants