Scrivio Interview library
LeadershipAdvanced6 min read · updated 12 November 2026

Metrics costs for your observability vendor doubled in a year. What standards would you set for metrics in Spring services?

Metrics cost is driven by the number of active time series, so the standards must control series, not just services. I would ship a standard set of metrics and tags per service type through a shared starter, give each service a cardinality budget with an alert when it is exceeded, turn off default metrics nobody uses with MeterFilters, enable histograms only for the timers behind SLOs, and regularly delete dashboards and alerts that nobody looks at, since they keep the metrics they read alive.

Why this question is asked

A doubling of the observability bill in a year is rarely caused by one big decision. It is the sum of many small ones: a new tag here, histograms turned on everywhere there, every new library adding its own meters, and nobody ever removing anything. Interviewers ask this leadership question because the answer needs both technical understanding of what drives cost and the judgement to set standards that teams will accept. In this answer, we will recap what vendors actually charge for, find where the growth comes from, and go through each standard with the reasoning a senior engineer uses and the numbers that make it concrete.

1A Quick Recap: What Are We Paying For?

Most metrics vendors charge by active time series, sometimes called custom metrics, plus how long data is kept and how often it is written. A time series is one metric name with one combination of tag values, such as http.server.requests with uri=/orders/{id}, method=GET, status=200 on one pod. So cost grows with three factors multiplied together: how many meters each service registers, how many tag combinations each meter has, and how many instances run.

Spring Boot with Micrometer registers a lot by default: JVM memory and GC, threads, class loading, process and system CPU, Tomcat or Netty, HikariCP connection pools, Logback events, HTTP server and client requests, and more. That is useful, but it is several hundred series per pod before we write a line of code, and a histogram on a timer adds dozens of bucket series for every tag combination.

2Finding Where the Growth Came From

Before setting standards, I would measure. We break the bill down by service and by metric name, which most vendors and Prometheus can do with a query that counts series per name and job. In situations like this the result is usually lopsided: a handful of metrics account for most of the series. Typical findings are histograms enabled globally for every timer, a few custom meters with unbounded tags, client request metrics with real URLs in the uri tag, and default metric families such as per-thread-pool executor meters that no dashboard ever shows.

This step matters for leadership as much as for engineering. Showing each team its own top five metrics with a cost attached turns an abstract 'reduce spending' request into specific, fair changes, and it tells us which standards will save the most.

Step throughA cost review for one service
  1. Count series per metric name and tagfrom the vendor or Prometheus
  2. Is the metric on a dashboard, alert or SLO?
    YesKeep it, check its tagsNoDeny it with a MeterFilter
  3. Do its tags stay within budget?
    YesKeep as isNoRemove or bucket the tag
  4. Is the histogram needed for an SLO?
    YesKeep the histogramNoTurn it off, keep count and sum
  5. Record the new series count against the budget

5 steps in order. Play them, or step through them one at a time.

3Standard 1: A Shared Starter With Metrics per Service Type

Teams should not each decide which metrics to publish. The platform starter, the auto-configuration library every service already uses, defines the standard set for each service type: an HTTP API, a Kafka consumer, a batch job. It sets common tags such as service, environment and version, which every dashboard needs, and nothing per request. It also contains the MeterFilters and distribution settings described below, so a new service starts at a known, reasonable size, for example 400 to 600 series per pod.

The starter is also where the standard can evolve. When we learn that a metric is useless, we remove it once and every service benefits on its next upgrade.

4Standard 2: Cardinality Budgets and Alerts

A budget makes the cost visible to the team that causes it. Each service gets a series budget per pod and for the whole service, say 1,000 per pod and 50,000 in total, with room to ask for more when there is a real need. We alert the owning team, not the platform team, when a deploy pushes the count over budget, and the starter adds hard caps for known risky tags.

Java
@Bean
MeterFilter platformDefaults() {
return MeterFilter.ignoreTags("userId", "sessionId", "requestId"); // never allowed as tags
}
@Bean
MeterFilter denyUnusedFamilies() {
return MeterFilter.denyNameStartsWith("jvm.classes"); // no dashboard reads these
}
@Bean
MeterFilter capUri() {
return MeterFilter.maximumAllowableTags("http.server.requests", "uri", 200, MeterFilter.deny());
}
# Prometheus alert rule: series per service over budget for 30 minutes
# count by (job) ({__name__=~".+"}) > 50000

Notice that the filters are in the starter, so a team does not need to remember them, and a team that truly needs a denied metric can re-enable it with a property, which is visible in review.

5Standard 3: Histograms Only Where SLOs Need Them

Histograms are the single biggest multiplier. With percentiles-histogram enabled, a timer publishes around 30 or more bucket series per tag combination instead of a handful. A service with 40 routes, 5 status codes and 20 pods produces 4,000 tag combinations, and with histograms that becomes well over 100,000 series for one timer.

So the standard says histograms are enabled only for the timers that back a service level objective, typically the inbound HTTP requests and perhaps one critical dependency call. Everything else keeps count, total time and max, which is enough for rates, averages and trends. Where the objective is a threshold, such as 'faster than 300 ms', SLO boundaries with management.metrics.distribution.slo give the answer with two or three series instead of thirty.

Typical savings from each standard
ChangeSeries beforeSeries after
Histograms only on SLO timers120,00018,000
Drop unbounded tags60,0002,000
Deny unused default families300 per pod180 per pod
Delete unused dashboards' metricsvariesoften 10 to 20 percent less
Illustrative numbers for one large service; measure your own before promising savings.

6Standard 4: Delete What Nobody Uses

Metrics are cheap to add and almost never removed, because nobody knows whether some dashboard still reads them. So twice a year I would run a review: list dashboards and alerts that nobody has viewed or that have not fired in six months, ask the owners, and delete them. Then the metrics they were the only reader of can be denied too. Many vendors can report dashboard usage and which metrics are never queried, and that report is a good starting point.

The reasoning here is cultural as much as financial. Teams accept cost standards when the standards are clearly about waste, not about taking away the signals they need during incidents. Budgets with exceptions, visible per-team numbers and a regular clean-up achieve that, and they keep the bill growing with the business rather than with carelessness.

7Follow-up questions

Would you reduce the scrape interval to save money?

Only after the series count is under control. Going from 15 to 60 seconds cuts samples written by four times and helps where vendors charge by data points, but it makes alerts slower and short spikes invisible. Reducing unneeded series saves money without losing any signal we use.

How do you handle a team that says every metric is essential?

I ask them to point to the dashboard, alert or SLO that reads it. If one exists, the metric stays and we look at its tags instead. If none exists, we deny it with a property they can switch back on. This keeps the discussion about evidence rather than opinion.

Should we move some metrics to a cheaper backend?

Possibly. Keeping high-volume, low-value metrics in a self-hosted Prometheus with short retention while sending SLO metrics to the vendor is a common split, and an OpenTelemetry Collector makes that routing easy. It adds operational work, so it should follow the clean-up, not replace it.

8Conclusion

In this answer, we saw that metrics cost follows the number of active series, which grows with meters, tag combinations and instances multiplied together. The standards control each factor: a shared starter defines the metrics and common tags per service type, budgets and alerts make each team's series count visible, MeterFilters turn off unused defaults and risky tags, histograms are kept for SLO timers only, and a regular review deletes unused dashboards and the metrics behind them.

What to say in the interviewAbout 80 seconds aloud

Open with

I would start by measuring, because cost follows active time series, and usually a few metrics cause most of it. Then I would set four standards. First, a shared platform starter that defines the metrics and common tags for each service type, like service, environment and version, and includes MeterFilters, so a new service starts at a known size.

Then, if they want more

Second, a cardinality budget per service, say a thousand series per pod, with an alert to the owning team when a deploy exceeds it, plus hard rules such as never using user ids or request ids as tags.

Third, disable default metrics nobody reads with MeterFilter deny rules, and turn histograms on only for timers that back an SLO, because a histogram multiplies series by thirty or more. Where the objective is a threshold, SLO buckets give the answer with two or three series.

Fourth, a regular review of dashboards and alerts, deleting the ones nobody uses and then the metrics only they read. I would show each team its own top metrics and their cost, so the changes feel fair and specific, and make sure the standards never remove the signals people need during incidents.

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, Actuator
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 "Metrics costs for your observability vendor doubled in a year. What standards would you...": https://scrivio-interview-library.netlify.app/spring-boot/actuator/1fde8778b8/