discourse / prometheus_exporter

A framework for collecting and aggregating prometheus metrics
MIT License
525 stars 153 forks source link

Add counter warmup option #315

Open ahobson opened 2 months ago

ahobson commented 2 months ago

Inspired by smart-prometheus-client, add an option to return 0 on first scrape.

As mentioned on that page, it can help with with problem of missing metrics

SamSaffron commented 1 month ago

I follow the idea here, but I am just not sure about this implementation, wouldn't the consumer simply be able to warm up the counters to whatever value they wanted?

Isn't the point to deliberately export a 0 on boot... counters in themselves should work fine if they start at 77 go to 33 and do not go to 0...