mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-30 07:59:40 -08:00
220e78b9c3
To cover the cases where stale markers may not be available, we need to infer the interval and mark series stale based on that. As we're lacking stale markers this is less accurate, however it should be good enough for these cases. We need 4 intervals as if say we had data at t=0 and t=10, coming via federation. The next data point should be at t=20 however it could take up to t=30 for it actually to be ingested, t=40 for it to be scraped via federation and t=50 for it to be ingested. We then add 10% on to that for slack, as we do elsewhere.
52 lines
928 B
Plaintext
52 lines
928 B
Plaintext
load 10s
|
|
metric 0 1 stale 2
|
|
|
|
# Instant vector doesn't return series when stale.
|
|
eval instant at 10s metric
|
|
{__name__="metric"} 1
|
|
|
|
eval instant at 20s metric
|
|
|
|
eval instant at 30s metric
|
|
{__name__="metric"} 2
|
|
|
|
eval instant at 40s metric
|
|
{__name__="metric"} 2
|
|
|
|
# It goes stale 4 intervals + 10% after the last sample.
|
|
eval instant at 71s metric
|
|
{__name__="metric"} 2
|
|
|
|
eval instant at 72s metric
|
|
|
|
|
|
# Range vector ignores stale sample.
|
|
eval instant at 30s count_over_time(metric[1m])
|
|
{} 3
|
|
|
|
eval instant at 10s count_over_time(metric[1s])
|
|
{} 1
|
|
|
|
eval instant at 20s count_over_time(metric[1s])
|
|
|
|
eval instant at 20s count_over_time(metric[10s])
|
|
{} 1
|
|
|
|
|
|
clear
|
|
|
|
load 10s
|
|
metric 0
|
|
|
|
# Series with single point goes stale after 5 minutes.
|
|
eval instant at 0s metric
|
|
{__name__="metric"} 0
|
|
|
|
eval instant at 150s metric
|
|
{__name__="metric"} 0
|
|
|
|
eval instant at 300s metric
|
|
{__name__="metric"} 0
|
|
|
|
eval instant at 301s metric
|