Skip to content

Use last_over_time if no time-series agg is provided #128624

@kkrik-es

Description

@kkrik-es

Since data points in each time series may be sampled independently, they are likely not aligned to the bucketing intervals of aggregation queries. Prometheus uses the newest sample (last value) that is less than the lookback period ago (5 minutes by default, query.lookback-delta flag) in each bucketing timespan, unless the query specifies a per-time-series aggregate function that is evaluated over all the values in the bucketing timespan. The plan is to introduce a similar approach for this type of queries.

This will unblock supporting queries missing a per-time-series inner aggregation function, like:

TS metrics | STATS avg(cpu_usage)) BY TBUCKET(1 hour)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions