Why are histograms and counters not automatically deleted but gauges are? #792
Replies: 1 comment 3 replies
-
Great question. The reason that histograms and counters are not automatically deleted is due to how Prometheus handles counter resets in functions such as Let me know if that didn't make sense/you have any follow up questions! |
Beta Was this translation helpful? Give feedback.
-
I'm having an issue with increasing scrape durations on the /metrics endpoint and I believe it can be solved by automatically clearing out my data directory (
PROMEHTEUS_MULTIPROC_DIR
) on gunicorn worker reloads. It will clear on deploys, but I don't deploy everyday and the scrape duration goes up pretty quickly, esp. for a set number of urls.Having read through #275 by way of #337, I found that
mark_process_dead
does clear out the data directory but only for gauges.https://github.com/prometheus/client_python/blob/master/prometheus_client/multiprocess.py#L155-L162
Why are histograms and counters not automatically deleted but gauges are?
Beta Was this translation helpful? Give feedback.
All reactions