Skip to content

fix(sdk-metrics-base): misbehaving aggregation temporality selector tolerance - #2958

Merged
legendecas merged 5 commits into
open-telemetry:mainfrom
legendecas:metrics-ff/at-call
May 12, 2022
Merged

fix(sdk-metrics-base): misbehaving aggregation temporality selector tolerance#2958
legendecas merged 5 commits into
open-telemetry:mainfrom
legendecas:metrics-ff/at-call

Conversation

@legendecas

Copy link
Copy Markdown
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

codecov Bot commented May 10, 2022

Copy link
Copy Markdown

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%) ⬆️

@seemk seemk left a comment

Copy link
Copy Markdown
Contributor

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

dyladan commented May 10, 2022

Copy link
Copy Markdown
Member

Thanks for moving the changelog entry to the correct section

@pichlermarc pichlermarc left a comment

Copy link
Copy Markdown
Member

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