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
Alerting: Add limit query parameter to Loki-based ASH api, drop default limit from 5000 to 1000, extend visible time range for new ASH UI #70769
Conversation
Hello @alexweav!
Please, if the current pull request addresses a bug fix, label it with the |
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 🚀
One NIT to remove commented out code.
getRuleHistory: build.query<DataFrameJSON, { ruleUid: string; from: number; to?: number }>({ | ||
query: ({ ruleUid, from, to = getUnixTime(new Date()) }) => ({ | ||
getRuleHistory: build.query<DataFrameJSON, { ruleUid: string; from?: number; to?: number; limit?: number }>({ | ||
query: ({ ruleUid, from, to, limit = 100 }) => ({ |
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.
why 100 and not 250?
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.
FE code LGTM! 🚀
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
…lt limit from 5000 to 1000, extend visible time range for new ASH UI (#70769) * Add limit query parameter * Drop copy paste comment * Extend history query limit to 30 days and 250 entries * Fix history log entries ordering * Update no history message, add empty history test --------- Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com> (cherry picked from commit f94fb76)
…drop default limit from 5000 to 1000, extend visible time range for new ASH UI (#70857) Alerting: Add limit query parameter to Loki-based ASH api, drop default limit from 5000 to 1000, extend visible time range for new ASH UI (#70769) * Add limit query parameter * Drop copy paste comment * Extend history query limit to 30 days and 250 entries * Fix history log entries ordering * Update no history message, add empty history test --------- Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com> (cherry picked from commit f94fb76) Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
…lt limit from 5000 to 1000, extend visible time range for new ASH UI (#70769) * Add limit query parameter * Drop copy paste comment * Extend history query limit to 30 days and 250 entries * Fix history log entries ordering * Update no history message, add empty history test --------- Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
…lt limit from 5000 to 1000, extend visible time range for new ASH UI (#70769) * Add limit query parameter * Drop copy paste comment * Extend history query limit to 30 days and 250 entries * Fix history log entries ordering * Update no history message, add empty history test --------- Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
What is this feature?
Allows clients to configure the record limit when querying loki. You can now supply a
limit
query parameter, with a value between 0 and 5000, to control the size of the returned page. Limits are hard-capped at 5000.The default limit, when the query parameter is not present, has been dropped from 5000 to 1000.
Which issue(s) does this PR fix?:
n/a
Special notes for your reviewer:
Please check that: