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(sdk-metrics-base): remove aggregator.toMetricData dependency on AggregationTemporality #2676

Merged
merged 5 commits into from
Jan 10, 2022

Conversation

legendecas
Copy link
Member

Which problem is this PR solving?

The aggregator interface may be implemented by users in the future extension. This PR simplifies the API surface of Aggregator.toMetricData to make it an opaque transformation from aggregator-specific Accumulation to exported MetricData. As aggregators do not need to process AggregationTemporality (they only need to expose merge and diff for metric processors to handle them), this should also apply to toMetricData.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Unit tests have been updated

@legendecas legendecas requested a review from a team December 17, 2021 16:36
@codecov
Copy link

codecov bot commented Dec 17, 2021

Codecov Report

Merging #2676 (49ac14f) into main (6b94e26) will decrease coverage by 0.00%.
The diff coverage is n/a.

❗ Current head 49ac14f differs from pull request most recent head e35d992. Consider uploading reports for the commit e35d992 to get more accurate results

@@            Coverage Diff             @@
##             main    #2676      +/-   ##
==========================================
- Coverage   93.03%   93.03%   -0.01%     
==========================================
  Files         155      155              
  Lines        5373     5368       -5     
  Branches     1133     1131       -2     
==========================================
- Hits         4999     4994       -5     
  Misses        374      374              
Impacted Files Coverage Δ
...metry-sdk-metrics-base/src/aggregator/Histogram.ts 97.91% <0.00%> (-0.09%) ⬇️
...entelemetry-sdk-metrics-base/src/aggregator/Sum.ts 100.00% <0.00%> (ø)
...ntelemetry-sdk-metrics-base/src/aggregator/Drop.ts 100.00% <0.00%> (ø)
...telemetry-sdk-metrics-base/src/aggregator/types.ts 100.00% <0.00%> (ø)
...metry-sdk-metrics-base/src/aggregator/LastValue.ts 100.00% <0.00%> (ø)
...-metrics-base/src/state/TemporalMetricProcessor.ts 97.91% <0.00%> (+0.04%) ⬆️

@vmarchaud vmarchaud added the bug Something isn't working label Dec 18, 2021
@legendecas legendecas merged commit 4909cf1 into open-telemetry:main Jan 10, 2022
@legendecas legendecas deleted the metrics-ff/aggregator branch January 10, 2022 16:50
rauno56 pushed a commit to rauno56/opentelemetry-js that referenced this pull request Jan 14, 2022
…ggregationTemporality (open-telemetry#2676)

Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants