prometheus-cpp icon indicating copy to clipboard operation
prometheus-cpp copied to clipboard

Could `Family` class support limited number of metrics?

Open zhitaoli-6 opened this issue 7 months ago • 0 comments

As can be seen from the declaration of the class Family, there is only one method named Remove(), which can remove the metric added before.
https://github.com/jupp0r/prometheus-cpp/blob/6492e820cdff7e7345d46d82b43735aaea542098/core/include/prometheus/family.h#L62

We worry about that there will be too many metrics if some label is added with very many values out of our expectation. So we want to limit the number of metrics for one Family object. Maybe LRU mechanism can get involved in to replace the very stale metric.

zhitaoli-6 avatar Aug 01 '24 04:08 zhitaoli-6