MiguelNdeCarvalho/speedtest-exporter

Use custom collector to correctly track metrics

Opened this issue · 2 comments

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

I will take a look on this, that was definitely a big problem when I added the labels that's why I removed them!

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.

image