metrics-rs / metrics

A metrics ecosystem for Rust.
MIT License
1.1k stars 151 forks source link

Question: metrics initialisation in Prometheus-exporter #375

Closed lswith closed 1 year ago

lswith commented 1 year ago

Hi, If I have registered a counter, does it get set to 0 until incremented? Or does it simply not get set to 0?

The reason I ask, is that a lot of our prometheus dashboards/alerts expect that there be a value, even if it's 0 as this indicates that the metric is still being emitted (and not an issue with the scraping of the metric etc).

I'm hoping I can also remove the idleTimeout so that even stale metrics get reported consistently.