logs search/aggregate silently return partial results when time range exceeds storage-tier retention

Aperta
#717 1 commento 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
rust
Ambito
cli, observability

Direzione di ricerca

Inizia dai punti di ingresso pup logs search e pup logs aggregate e dal percorso della Datadog Logs v2 API descritto nell’issue. Confronta il comportamento tra il tier predefinito e --storage=flex per un intervallo oltre la conservazione, quindi stabilisci come viene segnalato il completamento. Il completamento dovrebbe rendere visibile il troncamento tramite l’avviso selezionato, i metadati della risposta o la guida dell’help concordati per l’ambito.

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

Descrizione

enhancement product:logs usability
Summary

pup logs search and pup logs aggregate silently return partial results when the requested time range extends past the retention of the storage tier being queried. There is no warning, no metadata field indicating truncation, and no hint in --help that --storage is the knob to reach for.

Repro

On an org where the default (indexes) tier retains N days and Flex retains substantially more:

pup logs aggregate --query="service:some-service" --compute=count --from=30d
Returns counts consistent with only the last N days of data. Re-running the same query with --storage=flex returns the full 30-day count.

The output structure is identical in both cases — no truncated, partial, or retention_limit field on the response, and nothing on stderr.

Impact

For investigations that span more than the default tier's retention (incident forensics, audit lookbacks, long-horizon trend queries), the caller gets a plausible-looking answer that is silently incomplete. This is particularly risky for AI-agent callers, which do not know to cross-check against a second storage tier and will confidently report the truncated result as ground truth.

Suggested fixes
  1. stderr warning when --from reaches or exceeds detected retention for the selected tier, pointing at --storage.
  2. Response metadata — a retention_limited: true (or equivalent) field so programmatic callers can detect truncation.
  3. --storage=auto that picks the narrowest tier covering the requested range, and prints which tier it chose.
  4. --help cross-reference on logs search / logs aggregate noting that long lookbacks may require --storage=flex or --storage=online-archives.

Options 1 and 4 are the lowest-risk and would substantially close the gap on their own. Option 3 is the most user-friendly but is a larger design change.

Environment

pup 0.29.3

Behavior reproduced against the Datadog Logs v2 API path used by logs search and logs aggregate.

Lingua principale
Rust
Stelle
1k
Fork
138
Merge medio
17h
PR unite (30g)
82

Preparare l'ambiente

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 DataDog/pup

Tutte le issue di DataDog/pup

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.