mirror of https://github.com/prometheus/prometheus
Browse Source
SanitizeLabelName was not correctly sanitizing label names that: 1. Started with a digit (0-9) 2. Were empty This commit changes the santization code to catch both of these edge cases and adds new tests to validate it works correctly in them both. In the first case, a leading digit will be replaced with an underscore, and in the latter, the function will return a single underscore. Signed-off-by: Nick Moore <nicholas.moore@grafana.com>pull/11936/head
Nick Moore
2 years ago
2 changed files with 23 additions and 7 deletions
Loading…
Reference in new issue