Use custom collector to correctly track metrics
Opened this issue · 2 comments
adyanth commented
When caching metrics, all the labels from all the previous runs get cached which should not be the case. When a new run happens, the labels should be cleaned up and refreshed.
https://github.com/prometheus/client_python#custom-collectors
MiguelNdeCarvalho commented
I will take a look on this, that was definitely a big problem when I added the labels that's why I removed them!
jkoelker commented
I have a POC branch at https://github.com/jkoelker/speedtest-exporter/tree/custom_collector. I'm currently running this caching for 900s
and scraping every 1m
. Here is the dashboard I'm using with it if anyone wants to try it if its working as they expect.