Description
Metric queries can time out well before the system's actual per-request time budget is reached. The step that executes a metric's query doesn't specify how long it's allowed to run, so it silently falls back to a low, hardcoded default built into the query executor — far shorter than the overall time the system otherwise allows for a request. This makes metric queries fail on sources or queries that are simply a bit slower than usual, even though the request as a whole still has plenty of time budget left, and there's no way to tune this without a code change.
Environment
- Commit ID:
42b5c6b (v0.2.2)
- Environment: prod
Step to reproduce
A root cause
The metric-execution step calls the query executor without passing an explicit execution timeout. The executor's own default (a low, fixed value sized for ad-hoc/exploratory calls) applies instead, regardless of how much of the overall request's time budget is actually still available. A comparable, later-added query path in the system already passes its own explicit, environment-configurable timeout for exactly this reason — this one was never wired up the same way.
Context
The overall per-request time budget is deliberately generous and configurable. This step bypassed that intent by not forwarding any timeout at all, so it was bound instead by an executor-internal default never meant to be a system-wide limit.
Risks & Known Unknowns
- Any metric query against a source with variable or occasionally elevated latency is at risk of hitting this same low ceiling, independent of source health.
- The new configurable default was chosen conservatively; it may need tuning based on observed p95/p99 execution times once more data is available.
Description
Metric queries can time out well before the system's actual per-request time budget is reached. The step that executes a metric's query doesn't specify how long it's allowed to run, so it silently falls back to a low, hardcoded default built into the query executor — far shorter than the overall time the system otherwise allows for a request. This makes metric queries fail on sources or queries that are simply a bit slower than usual, even though the request as a whole still has plenty of time budget left, and there's no way to tune this without a code change.
Environment
42b5c6b(v0.2.2)Step to reproduce
A root cause
The metric-execution step calls the query executor without passing an explicit execution timeout. The executor's own default (a low, fixed value sized for ad-hoc/exploratory calls) applies instead, regardless of how much of the overall request's time budget is actually still available. A comparable, later-added query path in the system already passes its own explicit, environment-configurable timeout for exactly this reason — this one was never wired up the same way.
Context
The overall per-request time budget is deliberately generous and configurable. This step bypassed that intent by not forwarding any timeout at all, so it was bound instead by an executor-internal default never meant to be a system-wide limit.
Risks & Known Unknowns