feat: Add configuration to skip label sanitization#4796
Conversation
dbde2ee to
605c835
Compare
Label sanitization would convert labels with dots to underscores. This change updates the validation logic to accept any utf-8 valid label name. The read path has been [previously](#4442) updated to filter out all non-legacy label names (ascii with underscores) unless the `allow-utf8-labelnames` client capability is set. This is a breaking change: - Labels with dots will no longer be sanitized in to underscores. - Any labels written that do not match the regex `^[a-zA-Z_][a-zA-Z0-9_]*$` will be written as-is - Any labels written that do not match the regex `^[a-zA-Z_][a-zA-Z0-9_]*$` will be filtered out of the read path unless the `allow-utf8-labelnames` client capability is set. Consider using `IngestionRelabelRules` for label sanitization moving forward.
605c835 to
2671ca3
Compare
|
Won't be merged until relabeling rules are all set on the cloud side |
simonswine
left a comment
There was a problem hiding this comment.
Not too sure what others are thinking, but I fear this feels like a proper breaking change to our OSS users and therefore, I think we should not do it between releases, and bundle the change into a Pyroscope v2.
For now I would introduce a flag or even better a per tenant override controlling this change and once we are working on we can do the breaking change and provide instructions, how to get the old behaviour back via relabeling rules.
Wdyt?
Addressed in af4f74d. |


Label sanitization would convert labels with dots to underscores. This change updates the validation logic to accept any utf-8 valid label name. The read path has been previously updated to filter out all non-legacy label names (ascii with underscores) unless the
allow-utf8-labelnamesclient capability is set.By default, there is no change in logic/behavior
If
disable_label_sanitizationis set totrue, these are the breaking changes:^[a-zA-Z_][a-zA-Z0-9_]*$will be written as-is^[a-zA-Z_][a-zA-Z0-9_]*$will be filtered out of the read path unless theallow-utf8-labelnamesclient capability is set.Consider using
IngestionRelabelRulesfor label sanitization moving forward.