From 71c57a129282e0c0c6d15ef91b0d8404fc4cf375 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Thu, 16 Mar 2023 13:55:57 +0100 Subject: [PATCH] docs: Clarify that range selectors use a closed interval Signed-off-by: beorn7 --- docs/querying/basics.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/querying/basics.md b/docs/querying/basics.md index bc4478f62..9eb95c66e 100644 --- a/docs/querying/basics.md +++ b/docs/querying/basics.md @@ -157,9 +157,11 @@ syntax](https://github.com/google/re2/wiki/Syntax). Range vector literals work like instant vector literals, except that they select a range of samples back from the current instant. Syntactically, a [time -duration](#time-durations) is appended in square brackets (`[]`) at the end of a -vector selector to specify how far back in time values should be fetched for -each resulting range vector element. +duration](#time-durations) is appended in square brackets (`[]`) at the end of +a vector selector to specify how far back in time values should be fetched for +each resulting range vector element. The range is a closed interval, +i.e. samples with timestamps coinciding with either boundary of the range are +still included in the selection. In this example, we select all the values we have recorded within the last 5 minutes for all time series that have the metric name `http_requests_total` and