Skip to content

Commit fc3ddee

Browse files
Keep Sentry time window on paginated Discover requests
Append statsPeriod or start/end on every events query, not only the first page, so cursor pagination stays within the requested window. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 04179d0 commit fc3ddee

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

scripts/sentry/release-adoption-older-than.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,17 @@ function buildEventsSearchParams({
194194
params.append('sort', sort);
195195
}
196196

197-
if (cursor) {
198-
params.append('cursor', cursor);
199-
} else if (options.start && options.end) {
197+
if (options.start && options.end) {
200198
params.append('start', options.start);
201199
params.append('end', options.end);
202200
} else {
203201
params.append('statsPeriod', options.period);
204202
}
205203

204+
if (cursor) {
205+
params.append('cursor', cursor);
206+
}
207+
206208
return params;
207209
}
208210

0 commit comments

Comments
 (0)