Access the list of registered uninitialised metrics.
arjunbakshi245 opened this issue · 1 comments
I am using the gather function to get all the metrics registered.
I see that uninitialised metrics that do NOT have any labels are seen on the gather() output with default values. However, uninitialised metrics with label values are not seen on the gather() output. Possibly due to prometheus not knowing what to put in place of these label values. This breaks the uniformity of gather output based on existence of labels. If labels exist I can't list out all the metrics I have(irrespective of initialisation).
Not sure if I am missing a way to get all the metric names registered in a registry through some other way, but I think there must be support to populate the default values for the labeled metrics as well. These can be deleted automatically once the metric is set at least once WithLabelValues(). That way the gather can be used to see what all metrics exist. Is the same exists for unlabelled metrics, it could be helpful for labeled metrics as well.
@bwplotka ^^