Skip to content

Conversation

@JaydenElliott
Copy link

@JaydenElliott JaydenElliott commented Mar 14, 2023

I have come across a few instances were I would like to check if a particular metric exists in the metric Family without creating a new entry if it doesn't. This PR simply exposes the HashMap::get() function to allow for match metric_family.get() type logic.

Let me know if there is anything else needed to get this change merged.

@mxinden
Copy link
Member

mxinden commented Mar 23, 2023

Thanks for the pull request.

In order for me to better understand the feature request, mind expanding on your concrete use-cases for this method?

@JaydenElliott
Copy link
Author

#131 (comment) describes the use case (allows me to access the metrics of a family to do comparisons against, or use to trigger logic without modifying the underlying data structure).

@cratelyn
Copy link
Contributor

this was done in #234, i believe this can be closed now.

@mxinden
Copy link
Member

mxinden commented Dec 13, 2024

You are right. Thanks @cratelyn!

@mxinden mxinden closed this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants