-
Notifications
You must be signed in to change notification settings - Fork 104
Characters supported in tag values #1216
Description
We would like to gain more insight into what printable ASCII characters (32-126) are supported in tag values on Grafana/MetricTank.
Currently, our system only directly supports a limited character set: a-zA-Z0-9-_./%, and blocks other characters (or only allows other special characters via encoding them into HEX format).
However, the tag values in the timeseries data into our system might contain substantially more characters than this list.
Therefore we plan to support additional ASCII characters in tag values, given that they will not cause issues to any existing Grafana/MetricTank functionality, such as query, computation, etc.
We have conducted some basic tests on MetricTank and Grafana by putting each character to different positions of a tag value: leading, trailing and somewhere in the middle.
After combining the test results with other limitations, we have an initial proposal for the characters supported by our system, which is listed below:
0 - 9 allow everywhere in a tag value
a - z allow everywhere in a tag value
A - Z allow everywhere in a tag value
! # % & - / : < = > @ _ . allow everywhere in a tag value
(space) ~ allow only in the middle of a tag value
; Always block in a tag value because this is not supported by MetricTank
' Always block in a tag value because this is causes request error (unexpected character) when used on Grafana
" $ ( ) * + , ? [ ] \ ^ ` { } | Always block in a tag value because they might cause ambiguity when used in regex queries
Please kindly provide suggestions/comments if you feel any of this is not accurate. Moreover, in order to better understand the restrictions on tag values, we would like to confirm with you on the officially supported list of characters. If possible, please provide brief explanations on why a character is not supported. Finally, it is probably worth adding a regression test for this so we can confidently extend the character set that we plan to support in the future. Thanks!
This issue has also been posted to Grafana:
grafana/grafana#15261