Problem
asap-planner-rs currently requires a pre-defined, repeating query workload as input. Users with an existing Prometheus-Grafana stack cannot easily feed their real query workload into the planner without manually specifying queries.
Goal
Allow asap-planner-rs to accept a Prometheus query log file as input and auto-generate sketch configurations from it.
Details
Prometheus exposes a query log via the --query.log-file flag. The log is newline-delimited JSON, one entry per query, with fields including params.query (the PromQL expression) and ts (timestamp).
asap-planner-rs should:
- Accept a
--query-log flag pointing to a Prometheus query log file
- Parse the log and extract unique PromQL expressions
- Deduplicate and rank queries by frequency
- Generate
inference_config.yaml and streaming_config.yaml from the extracted workload, using the same logic as the existing config generation path
Acceptance Criteria
asap-planner-rs --query-log /path/to/query.log produces valid sketch configs
- Handles malformed or partial log lines gracefully (skip and warn)
- Works with query logs of at least 100k entries without excessive memory use
- Documented with an example query log snippet
Notes
This is a stepping stone toward passive always-on auto-discovery (tracked separately). Users run this once to bootstrap their config from historical traffic.
Problem
asap-planner-rs currently requires a pre-defined, repeating query workload as input. Users with an existing Prometheus-Grafana stack cannot easily feed their real query workload into the planner without manually specifying queries.
Goal
Allow asap-planner-rs to accept a Prometheus query log file as input and auto-generate sketch configurations from it.
Details
Prometheus exposes a query log via the
--query.log-fileflag. The log is newline-delimited JSON, one entry per query, with fields includingparams.query(the PromQL expression) andts(timestamp).asap-planner-rs should:
--query-logflag pointing to a Prometheus query log fileinference_config.yamlandstreaming_config.yamlfrom the extracted workload, using the same logic as the existing config generation pathAcceptance Criteria
asap-planner-rs --query-log /path/to/query.logproduces valid sketch configsNotes
This is a stepping stone toward passive always-on auto-discovery (tracked separately). Users run this once to bootstrap their config from historical traffic.