Skip to content
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

models_metric: Add IsValidLegacyLabelName. #753

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sujalshah-bit
Copy link

The changes ensure consistent validation of label names across the codebase, particularly in cases where label names may contain invalid characters (e.g., colons). This addresses issues with escaping labels in aggregators like by() and without().

PR COMMENT prometheus/prometheus#15833 (comment)_

This commit introduces two new functions, `isValidLegacyLabelRune`
and `IsValidLegacyLabelName`, to validate legacy label names and
their runes. The validation logic is consolidated by reusing the
`IsValidLabelCharacter` function.

Signed-off-by: sujal shah <[email protected]>
@SuperQ
Copy link
Member

SuperQ commented Jan 30, 2025

This needs a DCO sign-off. You can use git commit -s --amend to add it.

@sujalshah-bit sujalshah-bit force-pushed the add_IsValidLegacyLabelName_in_modal branch from 4010709 to 6ecc2fa Compare January 30, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants