Skip to content

feat(asap-planner-rs): add millisecond precision support for sub-second scrape intervals #398

Closed
2 of 2 issues completed

Description

@milindsrivastava1997

Background

The planner currently operates entirely in seconds for all time-related values. This includes:

  • RuntimeOptions.prometheus_scrape_interval — u64 seconds
  • QueryGroup.repetition_delay, step, range_duration — u64 seconds
  • InstantQueryInfo.repetition_delay / RangeQueryInfo.repetition_delay, step, range_duration — all seconds (frequency.rs)
  • IntermediateWindowConfig.window_size / slide_interval — seconds (window.rs)
  • AggregationConfig.window_size / slide_interval in asap-common — explicitly documented as seconds (aggregation_config.rs:23–24)
  • The windowSize and slideInterval fields in the generated streaming YAML — seconds

The query engine then multiplies these by 1000 at the point of use (e.g. promql.rs:484, capability_matching.rs:73).

Problem

This makes it impossible to plan configs for workloads with sub-second scrape intervals or millisecond-granularity step/range values. The minimum expressible window is 1 second. With high-frequency data sources (e.g. 100ms or 500ms scrape intervals), the planner cannot generate correct configs.

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions