fix(metric-issues): Handle 10k data point limit for the metric chart#109882
Open
fix(metric-issues): Handle 10k data point limit for the metric chart#109882
Conversation
static/app/views/detectors/components/details/common/buildDetectorZoomQuery.ts
Show resolved
Hide resolved
malwilley
commented
Mar 4, 2026
| @@ -81,12 +81,6 @@ export const DetectorErrorsConfig: DetectorDatasetConfig<ErrorsSeriesResponse> = | |||
| defaultField: DEFAULT_FIELD, | |||
| getAggregateOptions: () => AGGREGATE_OPTIONS, | |||
| getSeriesQueryOptions: options => { | |||
| // If interval is 1 minute and statsPeriod is 7 days, apply a 9998m statsPeriod to avoid the 10k results limit. | |||
| // Applied specifically to errors dataset because it has 1m intervals, spans/logs have a minimum of 5m intervals. | |||
| if (options.interval === 60 && options.statsPeriod === '7d') { | |||
Member
Author
There was a problem hiding this comment.
The max data points were recently updated to 10,100 to accommodate 7d, so this is no longer necessary
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
static/app/views/detectors/components/details/common/buildDetectorZoomQuery.ts
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes ISWF-2151
For metric detectors with a small time window (like 1 minute), some of the time ranges will fetch too much data for the chart and cause the request to respond with a 400.
This PR prevents us from fetching too much data, and displays a message to the user to explain that they will need to narrow the time range.
See here for an example: https://demo.sentry.io/issues/6755986934/
Before:
After: