promql: instant selectors keep stale series, reading 3-5% above VictoriaMetrics

Aperta
#42 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
backend, databases

Direzione di ricerca

Start by locating the PromQL instant-selector and rollup implementation, then read the tests covering lookback windows and stale series. Compare how instant selectors and default_rollup(m[5m]) handle stale samples and disappearing scrape targets. Done means the stated instant sum is within 1% of VictoriaMetrics on prod-us; the issue names no files or test commands.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Instant selectors on prod Snuffle (v0.101.0) return more series than VictoriaMetrics for metrics whose series disappear, such as pods that have terminated.

On Grafana prod-us, sum(kube_pod_container_resource_requests{resource="cpu"}) on posthog-prometheus vs victoriametrics:

time Snuffle VictoriaMetrics gap
2026-11-12T03:08Z (v0.100.0) 5812.8 5581.0 +4.2%
2026-11-13 ~02:52Z (v0.101.0) 5592.4 5324.8 +5.0%
2026-11-13 ~03:26Z (v0.101.0) 5304.6 5134.5 +3.3%

Why it looks like staleness: at 2026-11-12T03:08Z, VictoriaMetrics returned 5581 for default_rollup(m[5m]) and 5802 for last_over_time(m[5m]), so it drops series whose last sample is stale. Snuffle returned about the same number for both (5814.5 and 5812.8). Snuffle seems to keep any series that has a sample in the lookback window, even after the series has gone stale. It doesn't honour staleness markers, and it doesn't treat a series as gone when its scrape target disappears.

Not caused by #34 or #35: the gap is still there after the #35 revert (#41, shipped in v0.101.0). #34's sum(m[5m]) gives exactly the same numbers as the plain selector, so it inherits the gap without adding to it.

What done looks like: instant sum(kube_pod_container_resource_requests) on posthog-prometheus is within 1% of victoriametrics on prod-us.

🤖 Daniel's agent · perch shepherd

Lingua principale
Go
Stelle
3
Fork
0
Merge medio
18h 34m
PR unite (30g)
23

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PostHog/snuffle

Tutte le issue di PostHog/snuffle

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.