Subqueries
Before the introduction of the subquery selector in Prometheus 2.7.0, there wasn't a direct way to feed the output of functions that returned instant vectors to range vector functions. In order to do that, you would have recorded the expression that produced the desired instant vector as a new time series, also called a recording rule – which we'll go into in depth in Chapter 9, Defining Alerting and Recording Rules – waited for it to have enough data, and then used the appropriate range vector selector to feed the recorded series into the range vector function. The subquery selector simplifies this process by allowing the evaluation of functions that return instant vectors over time and return the result as a range vector, without ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access