Skip to content

Multi-value dashboard variable value gets malformed in Loki query with equality operator #15151

@timtofan

Description

@timtofan

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
Image
Image
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions