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 delta histogram sum not being reset on collection #2533

Merged

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Mar 16, 2022

Description

This PR fixes an issue where _ExplicitBucketHistogramAggregation does not reset the _sum field on collection, even though it always creates an AggregationTemporality.DELTA histogram and resets _bucket_counts to an all-zero array. This caused sum values to be wrong on export for both AggregationTemporality.DELTA and AggregationTemporality.CUMULATIVE

Fixes #2532

Type of change

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

How Has This Been Tested?

  • Added missing assertions to unit test.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@pichlermarc pichlermarc requested a review from a team March 16, 2022 08:53
Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, LGTM

@srikanthccv srikanthccv merged commit f7b33c6 into open-telemetry:main Mar 21, 2022
@pichlermarc pichlermarc deleted the fix-delta-histograms branch March 21, 2022 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics sdk Affects the SDK package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sum not being reset on AggreagationTempoarlity.DELTA Histograms
4 participants