Skip to content

Conversation

utpilla
Copy link
Contributor

@utpilla utpilla commented Aug 12, 2024

After #2004, we can potentially reuse ValueMap to track the measurements for any instrument. ValueMap offers a more performant tracking mechanism:

  • Lesser contention (Read-Write locks instead of Mutexes)
  • Allocation free hot-path (Switching to ValueMap's update logic would also help avoid unnecessary allocation of AttributeSet on the hot-path)

Currently, only counters (Sum aggreagtion) make use of ValueMap.

Changes

  • Moving ValueMap to mod.rs (a common place from where other instruments can also use it)

Next

  • I would be working on incorporating ValueMap for Gauge.

@utpilla utpilla requested a review from a team August 12, 2024 21:53
@utpilla utpilla changed the title Move ValueMap to mod file Move ValueMap to mod file to allow for code reuse Aug 12, 2024
Copy link

codecov bot commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 89.23077% with 7 lines in your changes missing coverage. Please review.

Project coverage is 75.1%. Comparing base (ed82d78) to head (cdf80aa).

Files Patch % Lines
opentelemetry-sdk/src/metrics/internal/mod.rs 89.2% 7 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2012   +/-   ##
=====================================
  Coverage   75.1%   75.1%           
=====================================
  Files        122     122           
  Lines      20887   20887           
=====================================
+ Hits       15701   15702    +1     
+ Misses      5186    5185    -1     

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

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