carlos / platform Public

log-retention-knobs

Slice 1 of #1024. Today carlos logs (and the errors family) keep 7 days or 50 MiB per app per box, hard-coded in internal/host/logship.go; a busy self-hosted app (Tito) keeps only hours. This adds two host.env settings, CARLOSLOGRETENTIONDAYS and CARLOSLOGRETENTIONMB (MB=off removes the byte cap), defaults unchanged.

The hourly prune used to LIST every hour it kept on every pass (~2,160 LISTs per app per box per hour at 90 days). pruneLedger walks once per process and once a day, adds this box's own flushes, and between walks LISTs only the hours it deletes: one ListDirs per app per hour plus one List per dropped hour; the daily walk averages ~90 LISTs per hour at 90 days.

Astra reviewed (no runtime bugs; test gap and cost wording fixed in dfc9c8bf). Docs paragraph for carlos logs is in copy review.

Not in this slice: a separate budget for edge request records (they share chunks with app logs, so that needs its own chunk family), archive tier, index, drains.

Commits 8
Discussions 0 0 open
Tasks 5/5 done

Activity