-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SendSumOfHistograms should support native histograms #6489
Comments
I'd love to take this issue but not sure whether I could take on this as a new contributor. If possible, I can spend some time familarizing myself with Cortex architecture and take a stab at this. Any tips would be appreciated :) |
Hi @cswpy, this specific PR doesn't need knowledge of Cortex architecture. It is more of aggregating histogram data types and handle native histograms. Some relevant knowledge are the usage of https://github.com/prometheus/client_golang and the implementation of native histogram type |
Thanks for the tips! I spent some time reading the Native Histogram Specs. From what I understood, since the native histograms have adaptive bucket boundaries, determined by schema, we need to calculate the upper boundaries and corresponding cumulative count, and add them to Cortex's |
No, I think it is the opposite. Native histogram uses a different format and our goal here is to aggregate native histograms and expose native histograms during scraping. We should extend |
Is your feature request related to a problem? Please describe.
SendSumOfHistograms
is a helper function Cortex uses to aggregate histograms from metrics registries. For example, we have certain metrics emitted from Thanos library and we aggregate them in Cortex.cortex/pkg/storegateway/bucket_store_metrics.go
Line 339 in 7ec57ac
With the introduction of some metrics being native histograms in Thanos,
SendSumOfHistograms
is not working properly as the current implementation only support legacy histograms.See
cortex/pkg/util/metrics_helper.go
Line 474 in 7ec57ac
It ignores native histogram buckets now
Describe the solution you'd like
Implement the sum aggregation with native histograms also
Additional context
It is unclear how would we merge legacy histograms with native histograms. Might not be a concern as we can assume in the single process it would be consistent to be either legacy or native histogram not both the same time.
The text was updated successfully, but these errors were encountered: