Repository navigation
Conversation
The services, service detail, service map and releases pages offer presets up to 12 months, but every timeseries through /execute was refused past 31 days. The services table waits on its sparklines, so 3mo/6mo/12mo (and 1mo across a DST change) showed "Couldn't load services / Time range too large". Timeseries and the services facets read the 365-day rollups, so they now get a 367-day ceiling. Lists, breakdowns and other kinds keep theirs.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Maple review🟡 Confidence 6/10 · needs attention. Held at 6 because a performance warning is open. Gives timeseries charts a 367-day ceiling so the service pages' 12-month presets stop failing, and shares it with the services facets. The widening also reaches sources with no year-long rollup (
Findings🟠 Warning · F1 ·
|
|
|
||
| /** Timeseries and the services facets read the 365-day rollups; everything else gets the general ceiling. */ | ||
| const executeRangeCeiling = (query: QuerySpec): number => | ||
| query.kind === "timeseries" || (query.kind === "facets" && query.source === "services") |
There was a problem hiding this comment.
Warning
executeRangeCeiling widens timeseries over raw metrics and product_events
F1 · Warning · performance
Every timeseries now passes the 367-day ceiling, but only traces reads a 365-day rollup. A 12-month window over metrics_* (90-day retention) or product_events (365-day fact table, queried raw) used to fail fast and now scans up to a year of rows in one query. The limits comment claiming rollup-less sources keep 30 days does not hold for either.
Gate the wider ceiling on the timeseries sources that read a 365-day rollup (e.g. `query.source === "traces"` plus the services facets) and leave `metrics`, `logs` and `product_events` on `MAX_QUERY_RANGE_SECONDS`.
🤖 Prompt to fix with an AI agent
In `packages/query-engine/src/runtime/query-engine.ts:850-852`: `executeRangeCeiling` widens timeseries over raw `metrics` and `product_events`.
Every timeseries now passes the 367-day ceiling, but only `traces` reads a 365-day rollup. A 12-month window over `metrics_*` (90-day retention) or `product_events` (365-day fact table, queried raw) used to fail fast and now scans up to a year of rows in one query. The limits comment claiming rollup-less sources keep 30 days does not hold for either.
Suggested fix: Gate the wider ceiling on the timeseries sources that read a 365-day rollup (e.g. `query.source === "traces"` plus the services facets) and leave `metrics`, `logs` and `product_events` on `MAX_QUERY_RANGE_SECONDS`.
Verify the problem exists at that location before changing it, and keep the fix to those lines.
Problem
The services list, service detail, service map and releases pages offer time presets up to 12 months, but the query engine refused every
/executetimeseries over 31 days. The services table waits on its sparklines, so picking a long range showed "Couldn't load services / Time range too large":Fix
MAX_TIMESERIES_RANGE_SECONDS(367 days: a calendar year, a leap day and a DST hour).maxRangeSecondsForKind("timeseries")returns it.validateExecuteapplies it to timeseries and to the services facets, which read the 365-day service overview rollups. Every other kind keeps the 31-day ceiling, and lists (7d) and breakdowns (30d) keep their own.Verification
QueryEngineService.test.ts: a 12-month (plus DST hour) grouped all-metrics timeseries runs, and a 3-month breakdown is still refused with "Time range too large".QueryEngineService.test.ts(47) andlimits.test.ts(11) pass.packages/query-enginetypecheck is clean.No UI change, so there are no screenshots.
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.