DevOps & Cloud · Log cost reducer
LogTrim
Stop paying to store noise.
One hour of logs turned into a price for every log pattern, the drop, sample or redact fix for each, the line of code that writes it, and filters ready to paste.
$ log-trim sample --replicas 40
18,328 lines, 7 patterns; about 1,321 GB and $5,525 a month at Datadog
fixes below save about $4,935 a month (89%)
$3,915/mo request completed method=GET path=/products/<*> status=<n>
LG003 SAMPLE: keep errors, sample 1 in 10 successes saves $3,524/mo
$711/mo GET /healthz <n> kube-probe LG002 DROP code api/health.py:2
The problem
Log bills grow quietly: a debug statement left on in production, a health check logged by every pod every few seconds, a line for every successful request, a whole object dumped into one message. Nobody knows which lines cost the money, so the bill just grows.
What it does
Reads a sample of plain text, JSON lines or CSV exports, gzipped or not: kubectl logs, CloudWatch, Datadog, Docker and Kubernetes formats
Groups millions of lines into a few hundred patterns and prices each one per month at Datadog, CloudWatch or Grafana rates, or your own contract price
Says what to do with each: drop debug and health-check logs, sample successful requests, deduplicate repeated errors, cap oversized lines
Finds the line of code that writes each costly pattern, so the fix can go in the code
Flags personal data and secrets in logs: emails, tokens, passwords, card numbers and phone numbers
Writes ready-made filters for Datadog exclusion rules, Fluent Bit, Vector and the OpenTelemetry Collector
Runs where your logs are; nothing is uploaded
How it works
- Export an hour of logs from one service or pod
- Run LogTrim to price every pattern and get the fixes
- Paste the filters, fix the top lines in code, watch the bill drop
Works with
Runs in your CI
# Monthly log cost review
log-trim analyze logs/*.jsonl.gz --repo . --replicas 12 --format md --out log-cost.md --filters vector --filters-out drop.toml
Your data
- Runs on your machine or in your CI; logs never leave it.
- Reports keep one example line per pattern.
- Personal data in logs is flagged, not copied elsewhere.
Who it's for
Questions
Is one hour of logs enough?
Usually: the same few patterns make most of the volume every hour. Use a busy hour, and set the number of pods so the monthly figure is right.
Do we need a new log pipeline?
No. The filters go into the pipeline you already have, and the biggest wins are often a one-line code change.
Related
Often used with LogTrim
BlastRadar
Change impact analysisKnow what a change will touch. Before a release, see every service a change can affect and the line of code that links it. After the release, confirm those services are still healthy.
$300–600 (₹10,000–20,000 in India)View product → DevOps & CloudSLOStudio
SLOs and error budgetsReliability you can measure. Define each SLO in a few lines and get correct burn-rate alerts, an error budget everyone understands, and a release gate, on the monitoring you already run.
$1,500–3,000 (₹40,000–80,000 in India)View product → DevOps & CloudTestScope
Test impact selectionRun the tests that matter. Every pull request runs the tests its change can affect, each with a stated reason, and the full suite whenever a change is too broad to trust.
$1,000–2,500 (₹25,000–60,000 in India)View product →See LogTrim on your own data
A 30-minute call. We run the product on your export, repository or document and walk you through the results.