@@ -30,7 +30,7 @@ linkTitle: Data Model
30
30
* [ ExponentialHistogram] ( #exponentialhistogram )
31
31
+ [ Exponential Scale] ( #exponential-scale )
32
32
+ [ Exponential Buckets] ( #exponential-buckets )
33
- + [ Zero Count] ( #zero-count )
33
+ + [ Zero Count and Zero Threshold ] ( #zero-count-and-zero-threshold )
34
34
+ [ Producer Expectations] ( #producer-expectations )
35
35
- [ Scale Zero: Extract the Exponent] ( #scale-zero-extract-the-exponent )
36
36
- [ Negative Scale: Extract and Shift the Exponent] ( #negative-scale-extract-and-shift-the-exponent )
@@ -643,14 +643,25 @@ perfect subsetting.
643
643
| 6 | 1.68179 | 2** (6/8) |
644
644
| 7 | 1.83401 | 2** (7/8) |
645
645
646
- #### Zero Count
646
+ #### Zero Count and Zero Threshold
647
647
648
- The ExponentialHistogram contains a special ` zero_count ` field
649
- containing the count of values that are either exactly zero or within
650
- the region considered zero by the instrumentation at the tolerated
651
- level of precision. This bucket stores values that cannot be
652
- expressed using the standard exponential formula as well as values
653
- that have been rounded to zero.
648
+ The ExponentialHistogram contains a special ` zero_count ` bucket and an optional
649
+ ` zero_threshold ` field where ` zero_count ` contains the count of values whose
650
+ absolute value is less than or equal to ` zero_threshold ` . The precise value
651
+ for the ` zero_threshold ` is arbitrary and not related to the scale.
652
+
653
+ When ` zero_threshold ` is unset or ` 0 ` , this bucket stores values that cannot
654
+ be expressed using the standard exponential formula as well as values that
655
+ have been rounded to zero.
656
+
657
+ Histograms with different ` zero_threshold ` can still be merged easily by
658
+ taking the largest ` zero_threshold ` of all involved Histograms and merge the
659
+ lower buckets of Histograms with a smaller ` zero_threshold ` into the common
660
+ wider zero bucket. If a merged ` zero_threshold ` is in the middle of a populated
661
+ bucket, it needs to be increased to match the upper boundary of the bucket.
662
+
663
+ In special cases, a wider zero bucket could be used to limit the total number
664
+ of populated buckets.
654
665
655
666
#### Producer Expectations
656
667
0 commit comments