Duvaxa

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.

Teams paying $2,000 or more a month for logsFinOps and platform teams cutting observability spendStartups whose Datadog bill doubled this year
log-trim · example
$ 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
Real run on the built-in demo shop, scaled to 40 pods.
ReadsText, JSON lines, CSV
PricesDatadog, CloudWatch, Grafana
FindsThe code writing each line
WritesVector, Fluent Bit, OTel filters

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

01

Reads a sample of plain text, JSON lines or CSV exports, gzipped or not: kubectl logs, CloudWatch, Datadog, Docker and Kubernetes formats

02

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

03

Says what to do with each: drop debug and health-check logs, sample successful requests, deduplicate repeated errors, cap oversized lines

04

Finds the line of code that writes each costly pattern, so the fix can go in the code

05

Flags personal data and secrets in logs: emails, tokens, passwords, card numbers and phone numbers

06

Writes ready-made filters for Datadog exclusion rules, Fluent Bit, Vector and the OpenTelemetry Collector

07

Runs where your logs are; nothing is uploaded

How it works

  1. Export an hour of logs from one service or pod
  2. Run LogTrim to price every pattern and get the fixes
  3. Paste the filters, fix the top lines in code, watch the bill drop

Works with

DatadogAmazon CloudWatchGrafana CloudKubernetesDockerFluent BitVectorOpenTelemetry Collector

Runs in your CI

GitHub Actions workflow step
# 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
Licensed customers get the action or command-line tool installed in their own organisation; it runs on your runners, so your code and plans never leave them. The command-line tools run in GitLab CI the same way.

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

Teams paying $2,000 or more a month for logsFinOps and platform teams cutting observability spendStartups whose Datadog bill doubled this year

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

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.

Book a demo