v.25.9New Feature
Aggregate functions timeSeriesChangesToGrid and timeSeriesResetsToGrid
Aggregate functionstimeSeriesChangesToGridandtimeSeriesResetsToGrid. Behaves similarly totimeSeriesRateToGrid, accepting parameters for start timestamp, end timestamp, step, and look back window, as well as two arguments for the timestamps and values, but requiring at least 1 sample per window instead of 2. Calculates a PromQLchanges/resets, counting the number of times the sample value changes or decreases in the specified window for each timestamp in the time grid defined by the parameters. The return type isArray(Nullable(Float64)). #86010 (Stephen Chi).
Why it matters
These functions address the need to analyze time series data by counting how many times the sample values change or reset within defined windows, similar to PromQL'schanges and resets functions. This helps users monitor fluctuations and resets in metrics efficiently, especially when working with irregular or sparse time series data.How to use it
UsetimeSeriesChangesToGrid and timeSeriesResetsToGrid by providing parameters for the start timestamp, end timestamp, step size, look-back window, and two arguments representing timestamps and their corresponding values. Unlike timeSeriesRateToGrid, these require at least one sample per window. The functions return an Array(Nullable(Float64)) representing counts for each time grid point.