Why external labels don't accept UTF-8 encoded string?

57 views
Skip to first unread message

Steve Wu

unread,
Dec 12, 2022, 3:55:19 AM12/12/22
to Prometheus Users
I understand labels in prometheus metrics have to be as small as possible to save disk space, therefore we don't support UTF-8, but what about external labels used by alerting rules? Do we need them to be small too?

Brian Candler

unread,
Dec 12, 2022, 5:33:42 AM12/12/22
to Prometheus Users
That's simply not true. Firstly, "Label values may contain any Unicode characters" - https://prometheus.io/docs/concepts/data_model/

Secondly, whether a label value contains UTF-8 characters or only ASCII characters has no bearing as to whether it's "long" or not.  Thirdly, the length of label values has minimal impact on disk space, since they are stored only once.

Therefore, if you've seen some behaviour that you didn't expect relating to length or character set of labels, can you show exactly what you did, and what you observed?

Reply all
Reply to author
Forward
0 new messages