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

Refactor MetricReader AggregationTemporality #2342

Merged
merged 3 commits into from
Sep 13, 2021

Conversation

reyang
Copy link
Member

@reyang reyang commented Sep 11, 2021

Follow up #2306 (comment).

The eventual goal:

  1. MetricExporter should not own exporting interval, all the exporters should not know the exporting interval.
  2. A reader should be able to express both, rather than stick with cumulative or delta, this will be useful for InMemory/Console/OTLP.
  3. Simplify the class hierarchy.

Changes

Please provide a brief description of the changes here.

  • introduced PreferredAggregationTemporality and SupportedAggregationTemporality to MetricReader
  • optimized the enum
  • fixed the base dispose ordering
  • added null argument check in MeterReader ctor

@reyang reyang requested a review from a team September 11, 2021 19:18
@codecov
Copy link

codecov bot commented Sep 11, 2021

Codecov Report

Merging #2342 (16dab02) into main (e97e50b) will increase coverage by 0.10%.
The diff coverage is 73.91%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2342      +/-   ##
==========================================
+ Coverage   80.59%   80.70%   +0.10%     
==========================================
  Files         230      230              
  Lines        7309     7319      +10     
==========================================
+ Hits         5891     5907      +16     
+ Misses       1418     1412       -6     
Impacted Files Coverage Δ
...Telemetry/Metrics/PeriodicExportingMetricReader.cs 0.00% <0.00%> (ø)
src/OpenTelemetry/Metrics/MetricReader.cs 82.75% <76.47%> (-1.86%) ⬇️
...OpenTelemetry/Metrics/BaseExportingMetricReader.cs 88.88% <100.00%> (+0.65%) ⬆️
src/OpenTelemetry/Metrics/MeterProviderSdk.cs 95.06% <100.00%> (ø)
...Telemetry/Internal/SelfDiagnosticsEventListener.cs 97.63% <0.00%> (+0.78%) ⬆️
...Zipkin/Implementation/ZipkinExporterEventSource.cs 72.72% <0.00%> (+9.09%) ⬆️

@cijothomas cijothomas merged commit bec00a9 into open-telemetry:main Sep 13, 2021
@reyang reyang deleted the reyang/refactor-metric-reader branch September 15, 2021 03:39
@reyang reyang mentioned this pull request Sep 15, 2021
3 tasks
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.

5 participants