-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added metrics to MetricFamily exceptions to fix #362 #364
Added metrics to MetricFamily exceptions to fix #362 #364
Conversation
081796c
to
30774e6
Compare
Signed-off-by: Rick van Hattem <[email protected]>
30774e6
to
a3fa450
Compare
That's a bit more code than I'd expect. We can't use |
That's indeed possible, but the added advantage of this method is that you can catch |
We already know what the metric is, as it's in local scope. |
Only from within the exposition method, which is what I was trying to mitigate here. This allows for easy exception handling outside of it while still maintaining full backwards compatibility. Can you provide an example of how you would prefer the handling otherwise? The question you linked has 11 answers so that's a little broad :P |
First answer, 2nd example. |
I've simplified it a bit now, is that better? |
Signed-off-by: Rick van Hattem <[email protected]>
715fd92
to
6b4592e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code should also go in the openmetrics format generator
Signed-off-by: Rick van Hattem <[email protected]>
Signed-off-by: Rick van Hattem <[email protected]>
Thanks! |
No description provided.