-
Notifications
You must be signed in to change notification settings - Fork 11.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prometheus: variables in adhoc filters not working since 10.2 version #87979
Comments
Just an update to report that the issue is also present in Grafana 11.0.0 |
Hello I have found where the regression happened. We see in this commit that the The same inversion is also there in the last version, even if the code has significantly changed : grafana/packages/grafana-prometheus/src/datasource.ts Lines 844 to 851 in c73bbf1
|
Fixes grafana#87979 Signed-off-by: Stéphane Cazeaux <stephane.cazeaux@orange.com>
Fixes grafana#87979 Signed-off-by: Stéphane Cazeaux <stephane.cazeaux@orange.com>
thanks for reporting this issue and for your contribution @cazeaux 🎉 |
Fixes grafana#87979 Signed-off-by: Stéphane Cazeaux <stephane.cazeaux@orange.com>
What happened?
When you use a variable as a value for an adhoc filter, the variable is not evaluated and the filter is applied with the variable name. The problem is seen with Prometheus datasource.
Problem seen first in 10.2.1, and confirmed in 10.4.2
What did you expect to happen?
The variable should be evaluated, and the filter applied with the variable value instead of its name.
Did this work before?
It was working at least up to version 10.1.2.
How do we reproduce it?
platform=~$platform
platform=~$platform
. See inspect below:An example dashboard to reproduce the bug (you might change
platform
label to another label):Is the bug inside a dashboard panel?
No
Environment (with versions)?
Grafana: 10.2.1 and recent versions
OS: Windows 10
Browser: Edge, Vivaldi, Chrome, Firefox
Grafana platform?
Kubernetes
Datasource(s)?
prometheus
The text was updated successfully, but these errors were encountered: