Add dimension name sanitizer
vojtarylko opened this issue · comments
Vojtech Rylko commented
Feature Request
Add dimension name sanitizer along already existing LabelSanitizer
.
Motivation Behind Feature
Dimension names are limited by Prometheus:
may contain ASCII letters, numbers, as well as underscores. They must match the regex
[a-zA-Z_][a-zA-Z0-9_]*
names beginning with
__
are reserved for internal use.
Note: Dimension values may contain any Unicode characters.
Note: The metric name (sanitized by LabelSanitizer
) follows different rules ([a-zA-Z_:][a-zA-Z0-9_:]*
).
The reasoning behind this feature is same as in the #29.
Konrad `ktoso` Malawski commented
Would you send in a PR for this @vojtarylko ? Thanks!