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
Graphite: Process multiple queries to Graphite plugin #59608
Conversation
…le-graphite-queries' into mmandrus/fix-multiple-graphite-queries
This reverts commit 26b6463.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It would be nice if you could provide unit tests for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Hi, thanks for the fix. Unfortunately looks like this may have now broken the wildcard queries. While I can now confirm this fixes the original issue, now any wildcard metrics are only showing the last match of the set. Shall I open new issue with screenshots etc? |
Just to note wildcards were working in the original issue and were the only way to get multiple lines. This is now kind of the reverse! |
What is this feature?
Updates the Graphite datasource plugin to handle multiple queries, instead of just the last one in the list. It aliases each query in order to correlate queries with results.
Why do we need this feature?
The current behavior is causing issues in public dashboards, which we had previously not seen because the front end sends graphite queries to Graphite through the proxy instead of through /ds/query.
Which issue(s) does this PR fix?:
Fixes #59601
Special notes for your reviewer:
There is some less-than-ideal code in here to handle associating graphite query results with requests, but based on my research, it would not be safe to rely on result order aligning with query order. Using aliases seemed to be the safest approach.
An alternative would have been to send off multiple different queries to Graphite, but this seemed preferred to minimize the impact of errors.