Segmented Metrics

Don't Let a Bad Slice Hide in the Average

Any Sparvi monitor can be segmented by a dimension column, region, product, customer, environment. Each segment gets its own baseline and its own alert path, so an outage in one tenant never gets averaged away by healthy ones.

revenue per region · last 24h
AMER
$182,400 · within baseline
EMEA
$28,100 · 62% below baseline
Critical
APAC
$94,800 · within baseline
Overall (sum)$305,300

Why Segment a Monitor

An aggregate is a great summary and a terrible alert. Segmentation puts the alert where the problem actually is.

Per-tenant SLAs

Track latency, error rate, or throughput per customer. A single noisy enterprise tenant gets its own alert path without paging the whole on-call rotation for every regional dip.

Revenue by region or channel

Catch the EMEA drop on the day it happens, not at end-of-month close. Each region has its own baseline so weekend seasonality doesn't mask a real outage.

Pipeline health per source

Segment row counts by source system. If one upstream provider stops delivering at 3am, you see a flat line for that source while the rest of the pipeline keeps moving.

Quality by environment

Same monitor across dev, staging, and prod environments. Catches the case where a fix made it to staging but never landed in production.

Distribution per product line

Average order value per product line, null rate on key columns per region, anywhere a population-level mean would mask a sub-population spike.

Feature rollout safety

Segment by app version or experiment cohort. A regression that only affects 5% of users still gets its own alert instead of getting diluted by the other 95%.

How Segmentation Works

1

Pick a dimension

For built-in monitors, choose any column on the same table as the segment-by dimension. For custom SQL, alias your dimension column (e.g. region AS segment) and reference it in the segment column field.

2

Per-segment baselines

Sparvi tracks each segment independently. Statistical detection learns AMER's baseline separately from EMEA's, so EMEA's smaller volume doesn't make every AMER blip look like an anomaly.

3

Alerts name the segment

When a monitor fires, the issue includes the segment value ("EMEA below baseline") so the alert is actionable on the first read. Resolution and history are scoped to the segment too.

Rollups That Don't Lie

Collapsing per-segment values into one number can hide the very thing you want to see. Sparvi gives you four rollups and shows them side by side.

  • Sum, total across segments (the default for SUM/COUNT queries)
  • Average, mean of segment values
  • Min, the worst-performing segment
  • Max, the best-performing segment

Built-in metrics compute the un-grouped overall value via a separate query so the headline number is mathematically correct, not just a mean-of-means.

Detail view

Click into any segmented monitor to see every segment's current value, baseline, trend line, and last-evaluation timestamp. Sort by deviation to surface the most-broken slice first.

Issue history per segment

Each segment has its own resolution timeline. "EMEA was broken Friday, same cause as the May 2 incident", Sparvi shows past resolutions for the same segment so the on-call doesn't re-investigate from scratch.

Frequently Asked Questions

What is a segmented metric?

A segmented metric is a monitor that is computed once per value of a dimension column. Instead of one number for "row count on orders," you get one number per region, per product, or per tenant. Each segment has its own baseline and its own alert path, so a drop in one slice does not get hidden inside the overall average.

Which Sparvi monitors can be segmented?

Any of them. Built-in table-metric monitors (row count) and column-metric monitors (null %, distinct count, min, max, average, standard deviation) can be segmented by any column on the same table. Custom SQL monitors are segmented by aliasing a dimension column in the query and picking it in the segment column field.

How does the rollup work?

For built-in metrics, Sparvi computes a separate un-grouped value so the overall number is mathematically correct (not just an average of per-segment averages). For custom SQL monitors, you choose how the dashboard collapses per-segment values into one overall number, sum, average, min, or max. The detail view always shows all four side by side.

When should I segment a monitor?

Segment when an aggregate would hide a problem. Revenue per region, if EMEA drops 40% but APAC grows the same amount, the global total looks normal while one region quietly broke. Latency per tenant, signups per channel, error rate per service: anywhere you would want a separate alert per dimension value.

Watch the Right Slice

Segmented monitoring takes two clicks to enable on any monitor. Sparvi handles the per-segment baselines and the routing.

Start Free Trial