prometheusremotewrite: support for converting OTLP exponential histogram to Prometheus Native Histograms #16207
Labels
enhancement
New feature or request
exporter/prometheus
exporter/prometheusremotewrite
needs triage
New item requiring triage
Component(s)
exporter/prometheusremotewrite
Is your feature request related to a problem? Please describe.
Prometheus native histograms have just been released (https://github.com/prometheus/prometheus/releases/tag/v2.40.0). They can be converted to/from OTLP exponential histograms losslessly. Right now prometheusremotewriteexporter simply drops all OTLP exponential histogram metrics. This feature request is for adding the ability to convert OTLP exponential histograms to Prometheus Native Histograms in prometheusremotewriteexporter.
Describe the solution you'd like
In go.mod, update github.com/prometheus/prometheus v0.38.0 to v0.40.0 to pull in native histogram support
Add case to https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/translator/prometheusremotewrite/helper.go#L247 for metrics.ExponentialHistogram
Add a case for ExponentialHistogram to https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/translator/prometheusremotewrite/metrics_to_prw.go#L71. Should be straightforward to copy OTLP PostiveBuckets to Prometheus Positive Spans, etc.
Add test cases
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: