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): misbehaving aggregation temporality selector tolerance #2958

Merged
merged 5 commits into from
May 12, 2022

Conversation

legendecas
Copy link
Member

Which problem is this PR solving?

When the AggregationTemporalitySelector returns different AggregationTemporality for the same instrument type, the collection result can be very misleading and incorrect.

Short description of the changes

  • For a given MetricReader/MetricCollector and metric storage mapped by views, the AggregationTemporalitySelector is only invoked once.

Type of change

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

How Has This Been Tested?

  • TemporalMetricProcessor.buildMetrics is tested with AggregationTemporalitySelector call count verification

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added

@legendecas legendecas requested review from a team and seemk May 10, 2022 11:30
@legendecas legendecas force-pushed the metrics-ff/at-call branch from c916dcf to 301e77b Compare May 10, 2022 11:33
@codecov
Copy link

codecov bot commented May 10, 2022

Codecov Report

Merging #2958 (add238d) into main (479321c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2958   +/-   ##
=======================================
  Coverage   92.53%   92.53%           
=======================================
  Files         183      183           
  Lines        5958     5959    +1     
  Branches     1266     1266           
=======================================
+ Hits         5513     5514    +1     
  Misses        445      445           
Impacted Files Coverage Δ
...-metrics-base/src/state/TemporalMetricProcessor.ts 97.95% <100.00%> (+0.04%) ⬆️

Copy link
Contributor

@seemk seemk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely glanced over this section when you initially mentioned the issue, thanks! 👍

@dyladan
Copy link
Member

dyladan commented May 10, 2022

Thanks for moving the changelog entry to the correct section

Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🙂

@legendecas legendecas merged commit 269a495 into open-telemetry:main May 12, 2022
@legendecas legendecas deleted the metrics-ff/at-call branch May 12, 2022 02:45
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.

4 participants