Find and drop the log lines nobody reads
Most log bills are paid for lines nobody reads: a heartbeat every five seconds, a health check on every request, a debug line someone forgot to turn down. The hard part is not dropping them. It is being sure nothing depends on them first.
ZipLogger answers that in two steps. The cost advisor finds the patterns that make up your volume and checks which of them anything uses. A drop rule then stops storing the ones you pick.
The cost advisor
Open Usage and scroll to Cost advisor. Pick Last 24 hours, Last 7 days or Last 30 days.
It groups your logs into message patterns, so Heartbeat ok from worker 7 and Heartbeat ok from worker 12 are one line, and ranks them by share of volume. For each pattern it then checks what uses it in that period:
- every enabled log alert rule in the environment
- every dashboard panel with a log query
- every error pattern an AI investigation cited in the last 30 days
Each check is run as a real query against your logs, not guessed from the rule's text. A pattern nothing matched is marked unused.
For an unused pattern, the advisor writes the drop rule: the service (when the pattern comes from one), plus a "contains" text taken from the fixed part of the message (at least 12 characters, so it does not match too widely). It also counts how many lines that rule would have matched in the period. If that is more than the pattern itself has, the page tells you how many other lines it would drop too.
Stop storing creates the rule after you confirm. An Editor can do it; nothing is created by the advisor on its own.
What it will not propose
- Errors. A pattern whose lines are mostly error or fatal is marked "keep" and never offered.
- Patterns in use. Shown with what uses them, such as the alert's name.
- Generic text. A template like
ok {N}has no fixed text long enough to match safely, so it is listed for review with no rule. - Anything, when the check was incomplete. If one of the queries could not be evaluated, or there are more than 30 of them, nothing is offered for dropping.
- Small patterns. Under 1% of the lines, it is not worth a rule.
Logs sent without a declared message template, from a plain logger or an OpenTelemetry collector, are clustered from a sample of up to 2,000 lines. Their counts are estimates, and they are only listed for review if the environment has any log alert or dashboard query, because the advisor cannot check those clusters one query at a time.
Sizes are estimates too. ZipLogger does not store a size per line, so it measures a sample of each large pattern and multiplies. The page labels every size as an estimate.
One gap to know about: searches people run by hand are not recorded. A pattern someone looks up in Search every Monday can show as unused. Read the list before you drop anything.
Drop rules
You can also write a drop rule yourself under Search → Log processing → + Drop rule. It needs Only service, Only messages containing (at least 4 characters), or both. A rule with no filter would discard the whole environment, so it is refused.
Keep this share of the matching logs (%) keeps a sample, from 0 to 99. With 0, every matching line is dropped. Which lines are kept is decided by a hash of the line itself, so the answer is the same on every server and after a restart.
Two rules make it safe to use:
- Errors are never dropped. Logs with severity error, fatal or critical, and any log with a stack trace, are stored whatever the rule matches. A filter written for a chatty info line cannot hide a failure that happens to share its words.
- Metric rules still see dropped lines. Drop rules run after parse, scrub and metric rules. So you can turn
Heartbeat okinto a count with a metric rule, then drop the lines. The number stays, the storage goes.
Dropped lines are not stored, not searchable and not billed.
What the sender sees
A dropped line is not an error, so your SDK or shipper does not retry it. With a rule on service zl-deploy-smoke containing smoke-drop-me, four lines were sent in one batch to production: two info lines matching the rule, one matching error line, and one unrelated line. The response:
HTTP/1.1 202 Accepted
{"accepted":4,"rejected":0,"dropped":2, …}
accepted counts every line that needs no retry, stored or dropped. dropped says how many of those a rule discarded. The matching error line was kept. OpenTelemetry senders get a normal full accept.
The rule's row on the Log processing page shows how many lines it has dropped since the server started, so you can see it working.
Things to know
- It is permanent. A dropped line cannot be searched, alerted on or recovered later. Start with a keep percentage above 0 if you are unsure.
- New logs only. A rule does not delete what is already stored.
- Deleting the rule stops the dropping within 30 seconds.
- The money figure is conditional. The advisor shows what the dropped volume would cost at your overage rate. Inside your plan's allowance, dropping lines frees room and nothing more.
The details are in the cost advisor docs and the drop rule docs.