opentelemetry-java
opentelemetry-java copied to clipboard
Exponential Histogram indexing improvements
The spec defines multiple ways of indexing for exponential histogram buckets for different scales. Currently the indexing strategy is a simple log based one that works for all scales (it has some error in edge cases, and is slightly slower). See https://github.com/open-telemetry/opentelemetry-java/pull/3724#issuecomment-947344635 for some discussion regarding this.
What needs to be done
- Different implementations of
BucketMappershould be made and these can be switched out when the scale changes inDoubleExponentialHistogramBuckets. Reference implementations in Golang can be found here: https://github.com/open-telemetry/oteps/pull/179 - Testing, for indexing implementations
- Testing the limits of the exponential histogram by adding to existing tests. For example, record
Double.MAX_VALUEandDouble.MIN_VALUEin the same histogram, and ensure accuracy.