opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

[receiver/statsd] Add an exponential histogram option

Open jmacd opened this issue 3 years ago • 4 comments

Description: Adds a "histogram" option to enable the OTLP v0.11 auto-scaling exponential histogram aggregator for Timing and Histogram instruments. This uses the mapping functions from OTel-Go:go.opentelemetry.io/otel/sdk/metric/aggregator/exponential/mapping. This TEMPORARILY uses the Histogram data structure implemented in OTel-launcher-Go:lightstep/sdk/metric/aggregator/histogram/structure. The same structure is pending as a PR for OTel-Go: https://github.com/open-telemetry/opentelemetry-go/pull/3022; after that merges, this module will be updated to use it directly.

Link to tracking Issue: Fixes #5742

Testing: New tests added.

Documentation: README.md updated with examples including histogram configuration.

jmacd avatar Aug 04 '22 05:08 jmacd

This probably needs a rebase

mx-psi avatar Aug 05 '22 15:08 mx-psi

Will leave this in draft until the testbed refactoring is complete.

jmacd avatar Aug 16 '22 07:08 jmacd

~Having trouble with build dependencies; this may have to wait until OTel-Go 1.10 is released, which includes the recent boundary-inclusivity change.~ ~The lightstep/sdk/metric/aggregator/histogram/structure used in this PR also depends on that release and the same data structure will likely not be accepted/released until OTel-Go 1.11.~

jmacd avatar Aug 26 '22 15:08 jmacd

EDIT: The code in question has been released at github.com/lightstep/go-expohisto

~Please take another look.~ ~This now depends on the latest release of Lightstep's metric SDK as well as an "orphaned" sdk/metric/aggregator/exponential/mapping package that was merged after OTel-Go v0.31.0 and will not be released.~ ~If this continues to cause trouble, I will consider making a downstream copy of the mapping functions to smooth this over (i.e.,., otel-launcher-go/lightstep/sdk/metric/aggregator/histogram/mapping).~

jmacd avatar Sep 14 '22 23:09 jmacd

This PR has been updated to use a new, separate copy of Lightstep's OTel exponential histogram mapping functions and data structure. Please take another look!

jmacd avatar Oct 05 '22 22:10 jmacd

Updated for v0.62.0.

jmacd avatar Oct 13 '22 03:10 jmacd