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

Truncate GetLabels and GetSeries to max query length if no time provided #6618

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

afhassan
Copy link
Contributor

@afhassan afhassan commented Feb 28, 2025

What this PR does:
GetSeries, GetLabels, and GetLabelNames API endpoints have optional start and end time parameters. If user does not specify a start or end time parameter, we set them to minTime and maxTime.

This causes these requests to get rejected due to exceeding maxQueryLength limit

the query time range exceeds the limit (query length: 1348893h1m53.351551616s, limit: 720h0m0s)

A better approach is to truncate requests and return warning message

start or end time parameters not specified, response truncated to maximum query length (720h0m0s)

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@afhassan
Copy link
Contributor Author

Should we truncate response if ignoreMaxQueryLength is true?

@afhassan afhassan force-pushed the fix-get-labels-range-limit branch from c05250c to 700b1c2 Compare February 28, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant