Skip to content

Added support for asap-planner-rs to infer query repetitions and config from Prometheus query log#254

Merged
milindsrivastava1997 merged 2 commits intomainfrom
239-asap-planner-rs-accept-prometheus-query-log-as-input
Mar 30, 2026
Merged

Added support for asap-planner-rs to infer query repetitions and config from Prometheus query log#254
milindsrivastava1997 merged 2 commits intomainfrom
239-asap-planner-rs-accept-prometheus-query-log-as-input

Conversation

@milindsrivastava1997
Copy link
Copy Markdown
Contributor

@milindsrivastava1997 milindsrivastava1997 commented Mar 30, 2026

Earlier, the user had to supply a configuration to asap-planner-rs which had a list of PromQL queries and their frequency of repetition. To make ASAPQuery easier to use, this PR modifies asap-planner-rs to infer queries and their repetition intervals from a Prometheus query log (https://prometheus.io/docs/guides/query-log/)

@milindsrivastava1997 milindsrivastava1997 linked an issue Mar 30, 2026 that may be closed by this pull request
@zzylol
Copy link
Copy Markdown
Contributor

zzylol commented Mar 30, 2026

What if the query log shows variable query intervals and frequencies of a query expression, what will be the precompute decision?

@milindsrivastava1997
Copy link
Copy Markdown
Contributor Author

What if the query log shows variable query intervals and frequencies of a query expression, what will be the precompute decision?

Good question @zzylol . Right now, it takes the median of query inter-arrival times so it will depend on the exact inter-arrival times. It will NOT try to derive multiple frequency repetitions.

I think for such a case, we can add a warning if the inter-arrival times are very different from each other. I don't think we need to support that case right now?

@zzylol
Copy link
Copy Markdown
Contributor

zzylol commented Mar 30, 2026

What if the query log shows variable query intervals and frequencies of a query expression, what will be the precompute decision?

Good question @zzylol . Right now, it takes the median of query inter-arrival times so it will depend on the exact inter-arrival times. It will NOT try to derive multiple frequency repetitions.

I think for such a case, we can add a warning if the inter-arrival times are very different from each other. I don't think we need to support that case right now?

makes sense.

zzylol
zzylol previously approved these changes Mar 30, 2026
@milindsrivastava1997 milindsrivastava1997 merged commit 754d23b into main Mar 30, 2026
4 checks passed
@milindsrivastava1997 milindsrivastava1997 deleted the 239-asap-planner-rs-accept-prometheus-query-log-as-input branch March 30, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

asap-planner-rs: accept Prometheus query log as input

2 participants