You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Multi-value dashboard variable value gets malformed in Loki query with equality operator.
More specifically, value a.b is inserted into query as a\\.b.
Issue only happens if "selection options: multi-value" or "selection options: all" is enabled.
I checked variable type "custom" and type "query to loki datasource with label values lookup", issue reproduces in both cases.
For simplicity, screenshots are using type custom.
To Reproduce
create dashboard variable, f.e. of type "custom" and set values as a.b,c.d, enable "selection options: multi-value"
create loki panel, use variable in label filter
click "inspect query" and check the variable value in the query
Expected behavior
Variable value is not malformed in the query, specifically should be a.b in used example.
Environment:
Tested both on Grafana Cloud 10 and Grafana Cloud 11, issue reproduces in both cases.
Datasource is to Loki OSS v3.1.
Screenshots
The text was updated successfully, but these errors were encountered:
A working fix is to use =~ instead of =.
But maybe some warning could be shown if = is not supported for multi-value variables?
timtofan
changed the title
Dashboard variable value gets malformed in query to Loki
Multi-value dashboard variable value gets malformed in Loki query with equality operator
Nov 27, 2024
Describe the bug
Multi-value dashboard variable value gets malformed in Loki query with equality operator.
More specifically, value
a.b
is inserted into query asa\\.b
.Issue only happens if "selection options: multi-value" or "selection options: all" is enabled.
I checked variable type "custom" and type "query to loki datasource with label values lookup", issue reproduces in both cases.
For simplicity, screenshots are using type custom.
To Reproduce
a.b,c.d
, enable "selection options: multi-value"Expected behavior
Variable value is not malformed in the query, specifically should be
a.b
in used example.Environment:
Tested both on Grafana Cloud 10 and Grafana Cloud 11, issue reproduces in both cases.
Datasource is to Loki OSS v3.1.
Screenshots
The text was updated successfully, but these errors were encountered: