feat: add support for UTF-8 and new UTF-8 related validators - #96
feat: add support for UTF-8 and new UTF-8 related validators#96FUSAKLA wants to merge 2 commits into
Conversation
fixes #88 Signed-off-by: Martin Chodur <[email protected]>
|
@jmichalek132 would you give it a try? 🙏 |
Signed-off-by: Martin Chodur <[email protected]>
|
FYI with Prometheus 3.X UTF-8 support is enabled by default, but some backends like Mimir / Cortex / Thanos might not support it yet. |
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
| - Change: :warning: Enable UTF-8 support in metic and label names by default. To disallow usage of UTF-8 characters in metric and label names use the new validator [`doesNotUseUTF8`](./docs/validations.md#doesnotuseutf8). |
There was a problem hiding this comment.
| - Change: :warning: Enable UTF-8 support in metic and label names by default. To disallow usage of UTF-8 characters in metric and label names use the new validator [`doesNotUseUTF8`](./docs/validations.md#doesnotuseutf8). | |
| - Change: :warning: Enable UTF-8 support in metric and label names by default. To disallow usage of UTF-8 characters in metric and label names use the new validator [`doesNotUseUTF8`](./docs/validations.md#doesnotuseutf8). |
jmichalek132
left a comment
There was a problem hiding this comment.
LGTM, 2 small comments left.
|
Given the UTF-8 support was added to better support OTEL metrics, and the only character that was not allowed in Prometheus but is commonly used in OTEL is dot, it might be worth considering adding a validation that allows Prometheus charset + dot, without allowing other UTF-8 characters. |
|
|
||
| ## [Unreleased] | ||
| - Change: :warning: Enable UTF-8 support in metic and label names by default. To disallow usage of UTF-8 characters in metric and label names use the new validator [`doesNotUseUTF8`](./docs/validations.md#doesnotuseutf8). | ||
| - Added: new validator [`doesNotUseUTF8`](./docs/validations.md#doesnotuseemoji) to check if the metric and label names do not use UTF-8 characters. |
There was a problem hiding this comment.
is there a reason to add this specific type of utf8 character as opposed to any of the other blocks? It seems arbitrary. (Why not also exclude arrows or other symbols?)
fixes #88
this change will probably result into new major version, since the UTF-8 support might be breaking
Signed-off-by: Martin Chodur [email protected]