opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

Exponential Histogram indexing improvements

Open jamesmoessis opened this issue 3 years ago • 0 comments

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 BucketMapper should be made and these can be switched out when the scale changes in DoubleExponentialHistogramBuckets. 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_VALUE and Double.MIN_VALUE in the same histogram, and ensure accuracy.

jamesmoessis avatar Nov 09 '21 02:11 jamesmoessis