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 aggregate collector generic over temporality #2506

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fraillt
Copy link
Contributor

@fraillt fraillt commented Jan 11, 2025

Prerequisite for #2328

Changes

Provided several interfaces that allow to provide "ValueMap" implementation for specific temporality.
The key element is Collector (which implements AggregateCollector). It provides common functionality for all aggregations (Sum, LastValue, Histogram, etc...):

  • provide attribute-set filtering functionality (for measurement).
  • for specific temporality:
    • time initialization
    • aggregate data creation/initialization
    • collection of aggregation data
      This allow to have very clean concrete implementations. I have refactored ExponentialHistogram to use these new interfaces as an example.

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)

@fraillt fraillt requested a review from a team as a code owner January 11, 2025 18:45
Copy link

codecov bot commented Jan 11, 2025

Codecov Report

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

Project coverage is 77.9%. Comparing base (888d5a3) to head (01cd8a0).

Files with missing lines Patch % Lines
...-sdk/src/metrics/internal/exponential_histogram.rs 90.6% 6 Missing ⚠️
...pentelemetry-sdk/src/metrics/internal/collector.rs 98.6% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2506   +/-   ##
=====================================
  Coverage   77.9%   77.9%           
=====================================
  Files        123     124    +1     
  Lines      22943   22963   +20     
=====================================
+ Hits       17875   17900   +25     
+ Misses      5068    5063    -5     

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

@fraillt fraillt force-pushed the generic-metrics-collector branch from f89f06b to 09ebfdc Compare January 11, 2025 19:47
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