Added metrics to MetricFamily exceptions to fix #362#364
Added metrics to MetricFamily exceptions to fix #362#364brian-brazil merged 4 commits intoprometheus:masterfrom
Conversation
081796c to
30774e6
Compare
Signed-off-by: Rick van Hattem <Wolph@wol.ph>
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 <Wolph@wol.ph>
715fd92 to
6b4592e
Compare
brian-brazil
left a comment
There was a problem hiding this comment.
This code should also go in the openmetrics format generator
Signed-off-by: Rick van Hattem <Wolph@wol.ph>
Signed-off-by: Rick van Hattem <Wolph@wol.ph>
|
Thanks! |
No description provided.