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

[Metrics SDK] Reduce the scope of write lock #2489

Closed

Conversation

utpilla
Copy link
Contributor

@utpilla utpilla commented Dec 31, 2024

  • Write lock is only needed to get hold of the right tracker
  • We don't need to hold the write lock while updating the trackers. Updates for Histograms are more involved than other instruments. There is no need to hold the write lock for the duration of the update.

Changes

  • Drop the RwLockWriteGuard once we have the right tracker and then update the tracker

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)

@utpilla utpilla requested a review from a team as a code owner December 31, 2024 21:27
Copy link

codecov bot commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 80.64516% with 6 lines in your changes missing coverage. Please review.

Project coverage is 77.9%. Comparing base (42b4f2f) to head (da63650).

Files with missing lines Patch % Lines
opentelemetry-sdk/src/metrics/internal/mod.rs 80.6% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2489     +/-   ##
=======================================
- Coverage   77.9%   77.9%   -0.1%     
=======================================
  Files        123     123             
  Lines      22925   22947     +22     
=======================================
+ Hits       17870   17886     +16     
- Misses      5055    5061      +6     

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

@utpilla
Copy link
Contributor Author

utpilla commented Jan 1, 2025

This won't work properly for Delta temporality.

@utpilla utpilla closed this Jan 1, 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