Closed
Description
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
Metadata
Metadata
Assignees
Labels
No labels