-
Notifications
You must be signed in to change notification settings - Fork 12
feat: add support for UTF-8 and new UTF-8 related validators #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]