client_python icon indicating copy to clipboard operation
client_python copied to clipboard

Why not support config quantile in summary?

Open kramerli opened this issue 2 years ago • 4 comments

As the title, why cant use quantile in summary? And why even support summary if cannot use quantile in it?

kramerli avatar Feb 07 '23 14:02 kramerli

It has not been implemented, but a contribution would be welcome. Note the discussion in https://github.com/prometheus/client_python/issues/162. However, histograms are typically preferred as they are aggregatable.

csmarchbanks avatar Feb 07 '23 17:02 csmarchbanks

The problem with histograms is that you need to know the expected measurement ahead to design proper buckets sizing, that is more prone to quantile errors https://medium.com/mercari-engineering/have-you-been-using-histogram-metrics-correctly-730c9547a7a9

I guess that Summary is more limited though as it cannot be aggregated, but it is supposed to give you the exact percentile you're looking for

jjhidalgar avatar Jul 14 '23 16:07 jjhidalgar

That issue is generally fixed with the new idea of native histograms in Prometheus (see the talk from PromCon). We hope to support native histograms in this client soon, see https://github.com/prometheus/client_python/issues/918.

csmarchbanks avatar Jul 14 '23 19:07 csmarchbanks

Hi, consider this package https://github.com/RefaceAI/prometheus-summary

It is fully compatible with native prometheus client summary and adds support of configurable quantiles

antonmyronyuk avatar Nov 21 '23 15:11 antonmyronyuk