You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realized this while working on unit tests for #5940:
In order to switch to exponential histograms, you register a View with aggregation
Aggregation.base2ExponentialBucketHistogram()
However, under the hood there's only one implementation: DoubleBase2ExponentialHistogramAggregator. This is used for both DoubleHistogram and LongHistogram.
As a result, if you have a LongHistogram the Exemplars always have value 0, because the aggregation always uses ReservoirCell.doubleValue and never ReservoirCell.longValue.
It looks like a LongBase2ExponentialHistogramAggregator is missing.
The text was updated successfully, but these errors were encountered:
Good catch! I just looked at the source code and it looks like the explicit bucket histogram aggregation doesn't suffer from this problem because it takes advantage of the exemplar reservoir being HistogramExemplarReservoir, a purpose built reservoir which knows that only double histograms are exported and casts the long measurement value to a double before recording in the reservoir.
Something similar is needed for exponential histograms, but even the explicit bucket histogram solution is brittle because it would be subject to the same failure mode once we make exemplar reservoirs configurable via views. We really need both explicit and exponential bucket histograms to always cast measurements to doubles before trying to record in the exemplar reservoir.
I realized this while working on unit tests for #5940:
In order to switch to exponential histograms, you register a View with aggregation
However, under the hood there's only one implementation:
DoubleBase2ExponentialHistogramAggregator
. This is used for bothDoubleHistogram
andLongHistogram
.As a result, if you have a
LongHistogram
the Exemplars always have value0
, because the aggregation always usesReservoirCell.doubleValue
and neverReservoirCell.longValue
.It looks like a
LongBase2ExponentialHistogramAggregator
is missing.The text was updated successfully, but these errors were encountered: