I’ve got a problem with forward slashes within the tag key of a query.
I do have a variable (request) which loads all request names and want to use the picked value in my queries.
SELECT count(“responseTime”) FROM “requestsRaw” WHERE (“requestName” =~ /^$request$/) AND $timeFilter
When I use the “query helper” - the one where you can click your query together - it work’s.
The query inspector shows me this:
SELECT count(“responseTime”) FROM “requestsRaw” WHERE (“requestName” =~ /^https://www.something.de/else.html$/)
As you can see, the forward slashes get escaped automatically. But I need to write my own requests without the easy query builder. If I do so, the query inspector show me this one.
The problem is that in raw mode, it is harder for Grafana to know the context and how it should be escaped. So you have to do some extra work yourself (like adding the extra brackets). We haven’t got a PR for this so I don’t think it so easy to fix and the core team is not planning to work on this right now.