Metrics

Segments

Segments let you break a metric down by one or more dimensions — like country, platform, or subscription tier — and get separate alerts for each combination.

What segments do

Without segments, Lighthouse monitors your metric as a single global value — for example, "total signups in the last hour." With segments enabled, Lighthouse monitors the same metric independently for each value of the segment column — for example, "signups in the last hour for US," "signups in the last hour for UK," and so on.

Each segment combination fires alerts independently. An anomaly in one country won't suppress alerts for other countries.

Configuring segments

Segments are configured in the metric builder under the Segments section. Two steps:

  1. 1Enable segments Toggle segments on for the metric. When disabled, the metric runs as a single global value.
  2. 2Pick segment columns Select one or more columns to segment by. Only columns marked as segment columns on the dataset are available. If you select multiple columns, Lighthouse creates a separate track for each unique combination of values.

Segment keys

A segment key is the unique identifier for each breakdown combination. It's formed by joining the values of all selected segment columns — for example, if you segment by country and platform, a segment key might be US · mobile.

Segment keys appear in Slack alert messages, in the metric history view, and in trend charts so you can see which dimension combination triggered the alert.

Segments in alerts

Each segment fires its own threshold check independently. When a segment breaches the threshold, Lighthouse sends a Slack alert that includes the segment key so you know exactly which dimension triggered it.

For metrics with many segments, you can configure Lighthouse to send one aggregated Slack message (listing all breaching segments in a single alert) rather than one message per segment. This helps reduce Slack noise when a widespread issue affects many dimensions at once.

Empty segments

If a segment combination returns no rows in a given run — for example, no transactions from a particular country in the last hour — that segment produces no metric value and no alert fires.

This is the expected behavior. Lighthouse only alerts when a segment has data and that data breaches a threshold.

Tips

  • Use high-cardinality segment columns with care. A column with thousands of unique values will create thousands of segment tracks, each evaluated every run. Start with low-cardinality dimensions (country, plan tier, device type) and expand from there.
  • If you're seeing too many alerts, consider removing a segment column or switching to aggregated alert mode.
  • Segments are only available on Business metrics. SQL metrics can return segment columns in the query result and map them as segment dimensions.
Note
Deleted or renamed segment columns are flagged with a warning in the metric builder. You'll need to re-select a valid replacement column before the metric can continue running.