Merge pull request #12144 from prometheus/beorn7/doc

docs: Clarify that range selectors use a closed interval
This commit is contained in:
Björn Rabenstein 2023-03-16 17:15:26 +01:00 committed by GitHub
commit d303fa77b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -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