-
Notifications
You must be signed in to change notification settings - Fork 86
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
Expensive metric validation in debug mode #52
Comments
Heyy Max, I would like to work on this! |
Great. Let me know in case you need any help @AbhijithGanesh. |
Definitely @mxinden |
Can you explain about the expensive part of validating ? Does this mean this is taking more time/process ? |
Yes, correct, expensive in terms of hardware resources. |
so here, I am trying to ensure the |
I ran into an issue with a
This caused Prometheus to fail scraping with |
@chylex thanks for reporting here. In general, yes I am in favor of checking proper formatting of labels in debug mode. In your particular case, I am guessing that you provided an |
I provided what I considered to be the value of my label. I was missing the name of the label because I didn't learn how labels work properly, and thought that since I only had one "label", I should just pass its value. The library didn't complain that Once I found the issue, I corrected the |
When run in debug mode, I think it is worth exploring running different validations on the registered metrics.
Examples:
_total
as that is added automatically already.Registry::register
could ensure that no duplicate metric names are being registered.Registry::register
could ensure that the user did not provide an additional.
in theHELP
text. See Registry::register should not automatically append a period to the help text #56I think a goal worth striving for is keeping the dependency tree small for the sake of compile times.
The text was updated successfully, but these errors were encountered: