Converting sample histogram to floathistogram #1693
Replies: 3 comments 1 reply
-
I don't think the model.SampleHistogram is used in Prometheus's v1 query/query_range APIs. Where do you see that? The floathistogram link above points to low level chunk structures of the TSDB. Are you sure you want to create those? |
Beta Was this translation helpful? Give feedback.
-
Now I have realized that model.SampleHistogram is used in the API client. OK, so you are using that API client to retrieve a native histogram. What are you doing with it then? As said, it would be rather weird if you are going to create a TSDB histogram chunk with it. |
Beta Was this translation helpful? Give feedback.
-
Thanks @beorn7 for taking a look. I am using a open source project Promxy to query multiple mimir clusters and aggregate the results. Since Promxy is running prom engine itself so it needs the reverse conversion (SampleHistogram -> FloatHistogram) I have implemented translation here. Tl;DR I am deriving schema, spans and bucket values from HistogramBuckets using the following methodology:
|
Beta Was this translation helpful? Give feedback.
-
Hi Team,
I am working on a use case where I need to translate sample histogram which is returned via client_golang response to floathistogram. Is there a way to achieve that? Sample histogram is part of response of v1 query/query_range APIs.
cc: @beorn7
Beta Was this translation helpful? Give feedback.
All reactions