opentelemetry-collector-contrib
opentelemetry-collector-contrib copied to clipboard
[receiver/statsd] Add an exponential histogram option
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.
This probably needs a rebase
Will leave this in draft until the testbed refactoring is complete.
~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.~
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).~
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!
Updated for v0.62.0.