Skip to content

Commit c569150

Browse files
committed
Remove smoothed and instant selectors
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
1 parent a932794 commit c569150

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

proposals/2025-04-04_extended-range-selectors-semantics.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ avoiding implicit heuristics.
199199

200200
```promql
201201
increase(http_requests_total[5m] anchored)
202-
http_requests_total anchored
203202
```
204203

205204
![](../assets/2025-04-04_extended-range-selectors-semantics/2da740cff0429094d205883be2161df1.png)
@@ -215,13 +214,6 @@ http_requests_total anchored
215214
- If no sample is found within the selector range, the result dropped.
216215
- The lookback window is the lookback delta. Note: The loopback delta can be overriden per-query.
217216

218-
**Important note**:
219-
220-
For instant vector, this mode has the effect of **ignoring staleness markers**.
221-
That is, a sample is considered valid as long as it exists within the configured
222-
lookback window—even if a staleness marker would have invalidated it without the
223-
keyword.
224-
225217
**Use cases**:
226218
- Precise accounting for counter changes (provides integer results with integers)
227219
- Improved composability across range boundaries
@@ -293,13 +285,11 @@ The smoothed increase function effectively bridges gaps in the partial dataset b
293285

294286
### Application to Range and Instant Vectors
295287

296-
Both `anchored` and `smoothed` modifiers apply to:
297-
- **Range selectors**: `[5m] anchored`, `[10m] smoothed`
298-
- **Instant selectors**: `metric anchored`, `metric smoothed`
299-
300-
The `smoothed` modifier applies linear interpolation at time `t` using the nearest datapoints before and after that time. This creates a continuous estimation of values at range boundaries, resulting in smoother transitions between samples.
288+
The `smoothed` modifiers apply to:
289+
- **Range selectors**: `[10m] smoothed`
290+
- **Instant selectors**: `metric smoothed`
301291

302-
The `anchored` modifier uses actual samples at range boundaries rather than interpolated values. It effectively ignores staleness markers, continuing to use the last known value within the lookback window even if the metric has gone stale. This provides more accurate calculations for counter metrics by using real observed values.
292+
The `smoothed` modifier applies linear interpolation at time `t` using the nearest datapoints before and after that time. This creates a continuous estimation of values at range boundaries, resulting in smoother transitions between samples. This is basically smoothing gauges with linear interpolation.
303293

304294
### Applications to other functions
305295

@@ -393,7 +383,7 @@ temporary outages.
393383
## Implementation Plan
394384

395385
1. Implement the `anchored` and `smoothed` modifier behind the `promql-extended-range-selectors` feature flag for range floats.
396-
2. Implement `anchored` and `smoothed` for instant floats.
386+
2. Implement `smoothed` for instant floats.
397387
3. Implement `anchored` for range histograms and instant histograms.
398388
4. Implement `smoothed` for range histograms and smoothed histograms.
399389

0 commit comments

Comments
 (0)