Fix delta histogram sum not being reset on collection by pichlermarc · Pull Request #2533 · open-telemetry/opentelemetry-python
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