On 20.03.23 03:28, Brian Candler wrote: > > Note - I have no bucket metrics for histogram. > > What you say doesn't make sense to me. What you showed *is* a histogram, > and the metrics *prometheus_rule_evaluation_duration_seconds* *are* the > buckets.
Strictly speaking, it's a summary, and the metrics labeled with "quantile" are precalculated quantiles. Cf. https://prometheus.io/docs/practices/histograms/ > Therefore, if those are the metrics you have, then the 50th percentile is > simply > prometheus_rule_evaluation_duration_seconds{quantile="0.5"} > and the 90th percentile is simply > prometheus_rule_evaluation_duration_seconds{quantile="0.9"} > > There is no need to "calculate" the p50/p90/p99 latencies because you > already have them. That's correct. Note that there is no way to further aggregate the pre-calculated quantile (or change them for example to a different quantile or to a different time interval). If you need aggregatability or more flexibility for add-hoc queries, you have to use an actual histogram in your instrumentation of the monitored target (either the classic histograms or the new experimental native histograms). -- Björn Rabenstein [PGP-ID] 0x851C3DA17D748D03 [email] [email protected] -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/ZCGTQddnGDnFW5vL%40mail.rabenste.in.

