Problems
-
There is no way to copy/clone the HashMap<S,M> within family.
- Use case: Storing metrics to compare against later
-
There is no way to iterate over a metric Family or get metrics without knowing the labels.
- The only to get all metrics is to manually call
get_or_create() for every metric. This isn't great if you don't know the label names (don't store them etc...).
I am happy to tackle these if you want. I think making M clone (not sure why it isn't atm) and returning a new hashmap with the cloned values would fix both these problems.
Problems
There is no way to copy/clone the
HashMap<S,M>within family.There is no way to iterate over a metric
Familyor get metrics without knowing the labels.get_or_create()for every metric. This isn't great if you don't know the label names (don't store them etc...).I am happy to tackle these if you want. I think making
Mclone (not sure why it isn't atm) and returning a new hashmap with the cloned values would fix both these problems.