-
Notifications
You must be signed in to change notification settings - Fork 816
[BUG] Prometheus parser 0.22.0 does not early skip comment lines #1108
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
Comments
wissamir
added a commit
to wissamir/client_python
that referenced
this issue
May 27, 2025
Signed-off-by: Wissam Abu Ahmad <xy.wissam@gmail.com>
Fix proposal PR #1109 |
csmarchbanks
pushed a commit
that referenced
this issue
May 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Issue
Starting with version 0.22.0, comment lines do not skip validation and parsing early enough and third token goes into _is_valid_legacy_metric_name which results with an error when it does not match the METRIC_NAME_RE
Example:
"""# A random comment which goes into validation and passes"""
"""# Another random. comment which goes into validation and fails"""
"""# Whatever 335/125 random comment which goes into validation and fails"""
Expected behaviour:
Skip all comment lines. list(text_string_to_metric_families) should result with empty list []
Current behaviour:
A ValueError is raised for the second and third comment lines above
I'll be pushing a PR for the fix
The text was updated successfully, but these errors were encountered: