prometheus/docs
Julien 4199c2f45a
Add anchored and smoothed to vector selectors. (#16457)
* Add anchored and smoothed to vector selectors.

This adds "anchored" and "smoothed" keywords that can be used following a matrix selector.

"Anchored" selects the last point before the range (or the first one after the range) and adds it at the boundary of the matrix selector.

"Smoothed" applies linear interpolation at the edges using the points around the edges. In the absence of a point before or after the edge, the first or the last point is added to the edge, without interpolation.

*Exemple usage*

* `increase(caddy_http_requests_total[5m] anchored)` (equivalent of *caddy_http_requests_total - caddy_http_requests_total offset 5m* but takes counter reset into consideration)
* `rate(caddy_http_requests_total[step()] smoothed)`

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* Update docs/feature_flags.md

Co-authored-by: Charles Korn <charleskorn@users.noreply.github.com>
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com>

* Smoothed/Anchored rate: Add more tests

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

* Anchored/Smoothed modifier: error out with histograms

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>

---------

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
Signed-off-by: Julien <291750+roidelapluie@users.noreply.github.com>
Co-authored-by: Charles Korn <charleskorn@users.noreply.github.com>
2025-09-25 11:34:59 +02:00
..
command-line Add anchored and smoothed to vector selectors. (#16457) 2025-09-25 11:34:59 +02:00
configuration remote_write azure auth : add workload identity support (#16788) 2025-08-26 07:14:47 +01:00
images
querying doc: clarify start/end for label API endpoints (#17217) 2025-09-23 12:03:14 +01:00
feature_flags.md Add anchored and smoothed to vector selectors. (#16457) 2025-09-25 11:34:59 +02:00
federation.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
getting_started.md docs(): fix gettingStarted outdated graph reference 2025-09-15 17:31:18 +02:00
http_sd.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
index.md
installation.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
management_api.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
migration.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00
stability.md chore: exclude experimental /v1/ endpoints from stability guarantees 2025-08-12 16:45:17 +02:00
storage.md Standardize doc page title handling 2025-05-28 21:37:27 +02:00