Skip to content
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: Use default page size of 5000 when querying Loki for state history #66315

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

alexweav
Copy link
Contributor

@alexweav alexweav commented Apr 11, 2023

What is this feature?

Previously, we use Loki's default page size for range queries. In some cases, the page size was absurdly low - 100, even. Let's use 5000 as the default page size for now.

This is a bit of a band-aid solution. The loki operator can configure max_entries_limit_per_query to something really low, and there's not much we can do about it.

I'm posting this PR to widen things for now, but in the future we'll want to handle this limit more gracefully, by either:

  • Making this default page size configurable in config.ini
  • Stitching multiple Loki pages together in the grafana backend, if the max entries limit is extremely low.

Why do we need this feature?

This is a more reasonable pagination size for this sort of query.

Which issue(s) does this PR fix?:

n/a

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@alexweav alexweav added this to the 10.0.0 milestone Apr 11, 2023
@alexweav alexweav requested a review from a team as a code owner April 11, 2023 17:26
Copy link
Member

@JohnnyQQQQ JohnnyQQQQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexweav alexweav merged commit a384194 into main Apr 18, 2023
6 checks passed
@alexweav alexweav deleted the alexweav/pagination-loki branch April 18, 2023 19:31
@zerok zerok modified the milestones: 10.0.0, 10.0.0-preview May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants