-
Notifications
You must be signed in to change notification settings - Fork 501
Closed
Labels
bugSomething isn't workingSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.
Description
Describe your environment
main at 82ec2a5
Steps to reproduce
- Create a meter provider and add the
PeriodicExportingMetricReader - Create a view to change histogram aggregation to
Base2ExponentialHistogramAggregationand add it to the provider - Create a double histogram
- Record small values (ie: a nanosecond duration in units of seconds)
What is the expected behavior?
An exponential histogram is exported with valid scale and counts in buckets
What is the actual behavior?
Scale is reduced to unrealistic values (less than -10) and the histogram is corrupted.
Additional context
The temporal_metric_storage can merge the current aggregation into a default aggregation (default has zero counts and buckets are empty). See temporal_metric_storage.cc#L146.
When this happens the Base2ExponentialHistogramAggregation::Merge will reduce the scale incorrectly resulting in a corrupted histogram aggregation. This can happen when merging with any aggregation that has empty buckets (also the case if only zero values are aggregated).
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriage/acceptedIndicates an issue or PR is ready to be actively worked on.Indicates an issue or PR is ready to be actively worked on.