infra(logging): drop osint scrapy item payloads so 8 days fits the PVC
Measured during a crawl (2026-11-27 04:45-05:45Z): osint/news-scraper produced ~150 MB/h, 88 % of it one JSON item dump per crawled article (up to 4.7 kB per line, the same rows are in the osint Postgres DB). At the observed 2.9x compression that is ~10 GB over 192h and would not fit the 8Gi PVC, so drop exactly those lines by prefix for that one container. Operational lines (INFO/WARNING/ERROR, tracebacks, duplicate-URL warnings) still ship. docs/logging.md: document the drop rule and the two measured regimes.
This commit is contained in:
parent
179257d8fb
commit
4a933a0403
2 changed files with 50 additions and 12 deletions
|
|
@ -97,6 +97,23 @@ loki.process "pod_logs" {
|
|||
}
|
||||
}
|
||||
|
||||
// osint/news-scraper prints one JSON-ish *item* dump per crawled article
|
||||
// (`{'title': ..., 'url': ..., ... }`, up to 4.7 kB each). That is scraped
|
||||
// payload, not an operational log line — the same rows are written to the
|
||||
// osint Postgres DB — and it is ~88 % of the namespace's volume (measured
|
||||
// ~150 MB/h during a crawl). Keeping it would push 8 days of retention past
|
||||
// the 8Gi PVC, so it is dropped here, by exact prefix, for that one
|
||||
// container. Every operational line (scrapy INFO/WARNING/ERROR, tracebacks,
|
||||
// duplicate-URL warnings) still ships.
|
||||
stage.match {
|
||||
selector = "{namespace=\"osint\", container=\"news-scraper\"}"
|
||||
|
||||
stage.drop {
|
||||
expression = "^\\{'title':"
|
||||
drop_counter_reason = "osint_article_payload"
|
||||
}
|
||||
}
|
||||
|
||||
forward_to = [loki.write.local.receiver]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue