Closed vbmade2000 closed 2 years ago
Hi, you can just increase the counter every time you process an operation. Then Operations/Sec can be calculated by the Prometheus's rate()
function. See https://prometheus.io/docs/prometheus/latest/querying/functions/#rate
Okay. So does it internally save timestamp too, with each count? Also, rate()
function can be used in PromQL. Correct?
Prometheus saves the timestamp during each scrape.
Tentatively closing this, as there doesn't seem to be a real bug here.
Any idea on how to have a metric for the number of operations per second? Like a number of requests/second. I am using the rust-prometheus along with actix_web_prom to use it with Actix.