Skip to content

Commit 141ff14

Browse files
ArthurKnausandrewshie-sentry
authored andcommitted
fix(charts): Fix spans-low granularity ladder (#97660)
Fix spans-low granularity ladder to avoid generating intervals that are bigger than the requested timeframe. - closes [TET-1006: Agents: widgets inconsistently display data when range < 5min](https://linear.app/getsentry/issue/TET-1006/agents-widgets-inconsistently-display-data-when-range-5min)
1 parent bb08d70 commit 141ff14

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

static/app/components/charts/utils.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const TWENTY_FOUR_HOURS = 1440;
3333
export const SIX_HOURS = 360;
3434
const THREE_HOURS = 180;
3535
export const ONE_HOUR = 60;
36+
const THIRTY_MINUTES = 30;
3637
export const FIVE_MINUTES = 5;
3738

3839
/**
@@ -216,7 +217,8 @@ const spansLowFidelityLadder = new GranularityLadder([
216217
[TWENTY_FOUR_HOURS, '1h'],
217218
[SIX_HOURS, '30m'],
218219
[ONE_HOUR, '10m'],
219-
[0, '5m'],
220+
[THIRTY_MINUTES, '5m'],
221+
[0, '1m'],
220222
]);
221223

222224
/**

0 commit comments

Comments
 (0)