-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: normalize label name to follow prometheus spec #4264
Conversation
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
Correct me if I am missing anything. There are 3 ways to solve this issue
|
We are only concerned with the the label key not the value. The value can be whatever users set. We are only normalizing the label key string. We cannot reject in the UI itself because users want to set alerts on logs/traces which currently have attribute keys/names with dots in them. https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels: Label values may contain any Unicode characters.
Yes, I have opened a separate issue for that. The delivery of the alert is more important now. Eventually, we need to find a way to solve this issue. |
@srikanthccv will the url to the alert work fine? |
Yes, we are not changing anything in the URL. The URL is prepared (as of today) based on the query range payload not the result. |
Summary
See the metrics labels section of https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels. The valid label name doesn't allow any special characters other than
_
. This PR normalizes the label name so that alertmanager doesn't reject the alert sending.Maybe TODO: SigNoz/alertmanager#22