-
Notifications
You must be signed in to change notification settings - Fork 0
asap-planner-rs: accept Prometheus query log as input #239
Copy link
Copy link
Closed
Labels
Description
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-logflag pointing to a Prometheus query log file - Parse the log and extract unique PromQL expressions
- Deduplicate and rank queries by frequency
- Generate
inference_config.yamlandstreaming_config.yamlfrom the extracted workload, using the same logic as the existing config generation path
Acceptance Criteria
asap-planner-rs --query-log /path/to/query.logproduces 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.
Reactions are currently unavailable