client_rust icon indicating copy to clipboard operation
client_rust copied to clipboard

feat(metrics/family): 🍬 `contains()` checks if metrics exist

Open cratelyn opened this issue 1 year ago • 1 comments

this commit introduces a small accessor to the Family<S, M, C> metric family type. this new contains() method allows callers to check whether or not a metric with the provided set of labels exists.

if no metric has been created via e.g. get_or_create(), this method will return false.

cratelyn avatar Nov 18 '24 23:11 cratelyn

my understanding is that this could be added behind the test-util flag proposed in #283.

cratelyn avatar Sep 02 '25 17:09 cratelyn