There is no need to reset in order to get current average latencies. That's the beauty of cumulative counters.
The PromQL would look like this: rate(my_histogram_seconds_sum[5m]) / rate(my_histogram_seconds_count[5m]) You can adjust whatever range vector value to want in order to control the averaging window. Up to 2x your scrape interval of course. On Fri, Jun 7, 2024 at 2:38 PM Błażej Suszka <[email protected]> wrote: > Hi, is it possible to reset histogram metric somehow? > I'm trying to get average latencies over time but as _sum is cumulatvie > since deploying I can't differentiate that. > > Thanks in advance for any suggesstions. > > Thanks > > -- > 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/2de4ba8b-59e7-44e1-96f6-d3e2d73fae19n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/2de4ba8b-59e7-44e1-96f6-d3e2d73fae19n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CABbyFmou3jjY0GoEuxH29-6R%3DkdY1Y%2BVa7bRcc2NA9zAfkqv%3Dg%40mail.gmail.com.

