How can I count the requests that took more than x seconds?

Hi,

I’m using istio and it gives me the metric: istio_request_duration_seconds_bucket.

I would like to plot the count the requests that take above (or under) x seconds. For example how many requests take more than a second.

I cant find something like the inverse of histogram_quantile^-1(x, metric) where x is in ms and the result the count of requests.

Another way is to plot the heatmap and just manually count the requests above x. But not ideal.

Regards,
Linus