doc: clarify start/end for label API endpoints (#17217)

Because the label API endpoints read from the TSDB indexes, they can
return information for series which are present in the index but have no
samples in the queried interval.

Add similar note for the series endpoint.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
Simon Pasquier 2025-09-23 13:03:14 +02:00 committed by GitHub
parent d04550a9c4
commit dde7d6ad37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 4 deletions

View File

@ -348,7 +348,9 @@ You can URL-encode these parameters directly in the request body by using the `P
or dynamic number of series selectors that may breach server-side URL character limits. or dynamic number of series selectors that may breach server-side URL character limits.
The `data` section of the query result consists of a list of objects that The `data` section of the query result consists of a list of objects that
contain the label name/value pairs which identify each series. contain the label name/value pairs which identify each series. Note that the
`start` and `end` times are approximate and the result may contain label values
for series which have no samples in the given interval.
The following example returns all series that match either of the selectors The following example returns all series that match either of the selectors
`up` or `process_start_time_seconds{job="prometheus"}`: `up` or `process_start_time_seconds{job="prometheus"}`:
@ -397,8 +399,9 @@ URL query parameters:
series from which to read the label names. Optional. series from which to read the label names. Optional.
- `limit=<number>`: Maximum number of returned series. Optional. 0 means disabled. - `limit=<number>`: Maximum number of returned series. Optional. 0 means disabled.
The `data` section of the JSON response is a list of string label names. Note
The `data` section of the JSON response is a list of string label names. that the `start` and `end` times are approximate and the result may contain
label names for series which have no samples in the given interval.
Here is an example. Here is an example.
@ -451,7 +454,10 @@ URL query parameters:
series from which to read the label values. Optional. series from which to read the label values. Optional.
- `limit=<number>`: Maximum number of returned series. Optional. 0 means disabled. - `limit=<number>`: Maximum number of returned series. Optional. 0 means disabled.
The `data` section of the JSON response is a list of string label values. The `data` section of the JSON response is a list of string label values. Note
that the `start` and `end` times are approximate and the result may contain
label values for series which have no samples in the given interval.
This example queries for all label values for the `http_status_code` label: This example queries for all label values for the `http_status_code` label: