What problem does the new feature solve?
Prometheus now supports to set lookback per query prometheus/prometheus#9946
In our framework, this parameter is defaulted to 5m and can't be overridden per query at present
|
const DEFAULT_LOOKBACK: u64 = 5 * 60; // 5m |
|
pub const DEFAULT_LOOKBACK_STRING: &str = "5m"; |
But the underlying planner does have a parameter
|
struct PromPlannerContext { |
|
// query parameters |
|
start: Millisecond, |
|
end: Millisecond, |
|
interval: Millisecond, |
|
lookback_delta: Millisecond, |
What does the feature do?
Support setting lookback per query as well.
Prometheus hasn't exposed this to HTTP API, so we only need to change the TQL part for now.
Specifically, makes TQL accept the new fourth optional parameter for lookback and handle it in the planner:
TQL EVAL (<start>, <end>, <step>, [lookback]) <promql>
Implementation challenges
No response
What problem does the new feature solve?
Prometheus now supports to set
lookbackper query prometheus/prometheus#9946In our framework, this parameter is defaulted to
5mand can't be overridden per query at presentgreptimedb/src/query/src/parser.rs
Lines 39 to 40 in a218f12
But the underlying planner does have a parameter
greptimedb/src/promql/src/planner.rs
Lines 83 to 88 in a218f12
What does the feature do?
Support setting
lookbackper query as well.Prometheus hasn't exposed this to HTTP API, so we only need to change the TQL part for now.
Specifically, makes TQL accept the new fourth optional parameter for lookback and handle it in the planner:
Implementation challenges
No response