Scrivio Interview library
LeadershipPrincipal7 min read · updated 12 November 2026

Log volume and cost grow faster than traffic in your organisation. How would you decide what to log, what to trace and what to measure, over the long term?

We give each signal one job: metrics for aggregates and alerts, traces for the path of a request, and logs for individual events that need detail. Then we make cost a managed quantity, with a budget per service and costs visible to the teams that create them, retention set by the value of the data (short for debug, longer for audit), audit and security logs kept as a separate stream with their own guarantees, and a regular review that removes what nobody uses.

Why this question is asked

When log volume grows faster than traffic, it usually means every new feature adds lines and nothing ever removes them, and logs are doing jobs that metrics and traces do far more cheaply. At a large organisation the bill reaches millions per year, and worse, the useful lines get buried. Interviewers ask this as a leadership question because there is no tool that fixes it; it needs a model that teams can apply on their own and incentives that keep it working for years. In this answer, we will see why volume outgrows traffic, define what each signal is for, introduce budgets and visible costs, set retention by value, separate audit logs, and build the review habit.

1Why Log Volume Outgrows Traffic

Traffic grows with customers, but log volume grows with customers times features times lines per feature. Each incident adds a few more lines "so we can see it next time", debug logging enabled during an investigation stays on, and new services copy the logging habits of old ones. Nothing in the normal workflow ever deletes a log statement, because removing one feels risky and nobody owns the bill.

There is also a mismatch of jobs. Teams count requests by counting log lines, measure latency by parsing durations from logs, and follow requests by searching for ids. All of these work, but they make logs do the work of metrics and traces at perhaps 100 times the cost. So the long-term fix starts with a shared model of which signal does which job.

2One Job for Each Signal

Metrics are numbers aggregated over time, such as requests per second, error rate or p99 latency. A counter costs the same whether it counts 10 or 10 million events, which makes metrics the right signal for dashboards, SLOs and alerts. Traces record the path and timing of individual requests across services, usually sampled, which makes them the right signal for "where did the time go". Logs record individual events with detail, such as an error with its context, a state change or a decision, which makes them the right signal for "what exactly happened in this case".

Which signal for which question
QuestionSignalWhy
How many orders failed in the last hour?Metricconstant cost, alertable
Is p99 latency within the SLO?Metrichistograms aggregate cheaply
Which service made this request slow?Tracespans show the path and timing
Why did order A-1009 fail?Logdetail for one event, found by trace id
Who changed this customer's limit?Audit logseparate stream, long retention
Every step of a successful requestNone by defaulttrace sampling or DEBUG on demand
The last row is where most excess volume comes from.

To see the difference in cost, take a checkout service handling 2,000 requests per second. Logging one INFO line of 400 bytes per successful request writes about 69 GB a day, only to answer questions such as "how many checkouts succeeded". A single counter with a status label answers the same question for a few kilobytes of time series, and a sampled trace shows the path of a slow checkout. The log line is still the right tool when a specific checkout fails, so we keep logs for failures and decisions and stop logging every success. That one change of habit, repeated across teams, is where most of the long-term savings come from.

3Budgets and Visible Costs

A model is not enough if nobody feels the cost. So we make it visible: the observability platform reports ingest volume and cost per service and per team every month, for example "payments: 1.8 TB per day, a cost of 4,100 a month, up 35 percent since June", next to the team's traffic. Most teams cut volume on their own once they see this, because they had no idea.

Then we set budgets. A budget can be expressed as bytes per request or as a monthly amount per service, agreed with the team and reviewed each quarter. When a service exceeds it, the response is a conversation, not an automatic cut: maybe the service grew, maybe a debug flag stayed on. We also give teams tools that make staying within budget easy, such as dynamic log levels through the Actuator loggers endpoint so DEBUG can be turned on for one service for 30 minutes and then off, and rate-limited logging helpers in the shared starter.

4Retention by Value, and Audit Logs Apart

Not all logs are worth keeping for the same time. Debug and info lines are useful for days, mostly during the incident or deployment that produced them; errors are useful for a few weeks; audit records may be required for years. So we set retention by class, for example 3 days for DEBUG, 14 days for INFO, 30 days for WARN and ERROR, and move older data to cheaper storage only where there is a real need to query it.

Audit and security logs are a different product. They record who did what, such as logins, permission changes and payments, and they need guarantees that application logs do not have: no sampling, no dropping when a queue is full, tamper-evident storage, restricted access and retention defined by legal or compliance teams. So they go through a separate, reliable channel, for example an audit event published to a durable topic or written to an append-only store, never as ordinary INFO lines that a cost review might cut. Keeping them apart also lets us be strict with the application logs without fear of losing something a regulator needs.

Step throughLog classes and their guarantees
  1. Debugon demand only, kept 3 days, may be sampled or dropped
  2. Application infokept 14 days, async, drops allowed and counted
  3. Warnings and errorskept 30 days, always shipped
  4. Security and auditseparate channel, never dropped, kept per compliance

4 layers, from the top down. Step through them one at a time.

5Reviewing and Removing What Nobody Uses

The last piece is the habit that keeps volume from growing back. Twice a year, each team gets a report of its top 20 log statements by volume together with how often anyone searched for them. Statements that produce terabytes and were never searched are candidates for removal, sampling or conversion to a metric. The same review checks dashboards and alerts that nobody looks at.

As a leader, I also watch the incentives. If postmortems always end with "add more logging", volume will keep growing, so we ask instead whether a metric, a trace attribute or a better error message would answer the question. And we measure the programme by outcomes: cost per thousand requests, investigation time, and the share of alerts based on metrics rather than log searches. If cost per request falls while investigation time stays flat or improves, the programme is working.

6Follow-up questions

Will cutting logs not make incidents harder to investigate?

Usually it makes them easier. Most cut lines describe successful, ordinary work and bury the few lines that matter. With traces for request flow, metrics for scale, and dynamic log levels for the rare deep dive, investigators find the important event faster. We remove lines nobody searched for, not error logs.

Should debug logging ever be enabled in production?

Yes, but on demand and briefly. We change the level for one logger or one service through the Actuator loggers endpoint or a configuration flag, for 15 to 30 minutes during an investigation, and switch it back. Leaving DEBUG on permanently is one of the most common reasons volume grows.

How do we handle teams that resist budgets?

We start with visibility and no enforcement for a quarter, so they see their own cost against traffic. Then we agree a budget with them rather than imposing one, help with the tooling to meet it, and treat overruns as a review topic. Most resistance comes from fear of losing data during incidents, so showing that traces and on-demand debug cover that fear matters more than the budget itself.

7Conclusion

In this answer, we saw that log volume outgrows traffic because lines are added with every feature and incident while logs do jobs that metrics and traces do more cheaply. The long-term model gives metrics the aggregates and alerts, traces the request flow, and logs the detailed events. We kept it working with per-service budgets and visible costs, retention by value, audit and security logs as a separate stream with stronger guarantees, and a regular review that removes what nobody uses.

What to say in the interviewAbout 90 seconds aloud

Open with

I would start by giving every signal one job, because most excess volume comes from logs doing the work of metrics and traces. Metrics are for aggregates and alerts, since a counter costs the same at ten or ten million events.

Then, if they want more

Traces are for following a request and finding where time went. Logs are for individual events that need detail, such as an error with context or a state change. Then I would make cost visible: a monthly report of ingest volume and cost per service, next to its traffic.

In my experience most teams reduce volume on their own once they see it. After a quarter of visibility, I would agree budgets per service, for example bytes per request, and give teams tools to stay within them, like dynamic log levels through Actuator and rate-limited logging helpers.

Retention would be set by value: a few days for debug, about two weeks for info, a month for errors. Audit and security logs would be a separate channel with no sampling, no dropping and retention set by compliance, so cost cuts on application logs never touch them.

Finally, I would build a twice-yearly review of each team's top log statements against how often anyone searched for them, and track cost per thousand requests and investigation time as the measures of success.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Spring Boot reference
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Log volume and cost grow faster than traffic in your organisation. How would you decide...": https://scrivio-interview-library.netlify.app/spring-boot/boot-logging/73527b81a3/