github.com/thanos-io/thanos@v0.32.5/pkg/query/testdata/promql/prometheus/staleness.test (about) 1 load 10s 2 metric 0 1 stale 2 3 4 # Instant vector doesn't return series when stale. 5 eval instant at 10s metric 6 {__name__="metric"} 1 7 8 eval instant at 20s metric 9 10 eval instant at 30s metric 11 {__name__="metric"} 2 12 13 eval instant at 40s metric 14 {__name__="metric"} 2 15 16 # It goes stale 5 minutes after the last sample. 17 eval instant at 330s metric 18 {__name__="metric"} 2 19 20 eval instant at 331s metric 21 22 23 # Range vector ignores stale sample. 24 eval instant at 30s count_over_time(metric[1m]) 25 {} 3 26 27 eval instant at 10s count_over_time(metric[1s]) 28 {} 1 29 30 eval instant at 20s count_over_time(metric[1s]) 31 32 eval instant at 20s count_over_time(metric[10s]) 33 {} 1 34 35 36 clear 37 38 load 10s 39 metric 0 40 41 # Series with single point goes stale after 5 minutes. 42 eval instant at 0s metric 43 {__name__="metric"} 0 44 45 eval instant at 150s metric 46 {__name__="metric"} 0 47 48 eval instant at 300s metric 49 {__name__="metric"} 0 50 51 eval instant at 301s metric