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_:]*).
Feature Request
Add dimension name sanitizer along already existing
LabelSanitizer
.Motivation Behind Feature
Dimension names are limited by Prometheus:
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 https://github.com/MrLotU/SwiftPrometheus/issues/29.