-
Notifications
You must be signed in to change notification settings - Fork 818
QueryFrontend error cannot be parsed correctly in Grafana #5324
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
Comments
I think we should fix this for 1.16 release. Let me know if there are other thoughts. |
Hi @dogukanteber, it is easy to reproduce this issue. Steps are:
![]() I tried If you are using curl directly, you can also try to reproduce this error https://github.com/cortexproject/cortex/blob/master/pkg/querier/tripperware/queryrange/query_range.go#L202 with a very small step size. |
Let's move this to release 1.17. Unfortunately we couldn't make it for 1.16 |
Not sure if it is the behavior got changed at newer version of Grafana. I am testing with Grafana v10.1.5. Looks like it doesn't display error at this version. ![]() When doing it via postman it is a 400 error. We should work on this ASAP. Actually we already have required types defined in Ruler https://github.com/cortexproject/cortex/blob/master/pkg/ruler/api.go#L104. We should start using it at QFE. |
Describe the bug
When query frontend throws error, Grafana will show error message like below.
This is not very readable and not user friendly. The issue is that Grafana expects errors to be returned with Prometheus' Error format. However, query frontend doesn't format error using the Prometheus error response format, it just returns the raw error string like https://github.com/cortexproject/cortex/blob/master/pkg/querier/tripperware/queryrange/query_range.go#L183.
Same issue happened at past as well, like #5260. Now we always forwards the request to querier to return error and this is very inefficient. Also there are errors happened in QueryFrontend only and returning to querier won't work.
We should format the error response correctly in query frontend, like Prometheus does.
The text was updated successfully, but these errors were encountered: