On Mon, 19 Oct 2020 at 08:21, Mounya A <[email protected]> wrote:
> Hello all,
>
> I have a question regarding calculting qunatiles in prometheus. I
> can only see every body mentioning the use of histograms to calculate
> qunatiles .We have quantile function in promql right? . Is it appropriate
> to use this function with summaries?
>
> Query I am using.
> quantile(.99 ,
> (sum by(job)(rate(api_response_time_sum{job="$stack" ,
> service=~"$product"}[30d])) /
> sum by(job)(rate(api_response_time_count{job="$stack",
> service=~"$product"}[30d]))
> )
> )
> will the above query give the desired result?
>
The quantile there is a noop, as you're only passing in one series. Even
fixing that you'd be getting the 99th percentile instance average latency,
not the 99th percentile latency of all requests.
If you want to calculate a quantile across an entire job, histograms are
the only way to do it correctly.
Brian
> Thanks in Advance .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Developers" 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-developers/56763331-fa1a-4fd3-b7a1-07d2eaaf53d2n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-developers/56763331-fa1a-4fd3-b7a1-07d2eaaf53d2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Brian Brazil
www.robustperception.io
--
You received this message because you are subscribed to the Google Groups
"Prometheus Developers" 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-developers/CAHJKeLohr7bj5PwSrg%2Bts%2BMCZc_HNX6_ZH-5EPpXvXtHc0Bkfw%40mail.gmail.com.