Course contentsShow
← System Design
Lesson 1177 of 1,91930. Observability: MetricsFree lesson

Summary Metrics

Learn summaries as client-side quantile calculations that provide percentile approximations.

Summary Metrics

You'll learn how summaries provide client-side percentile approximations through quantile calculations.

What Are Summary Metrics?

A summary is a metric type that calculates quantiles (percentiles) on the client side before sending aggregated statistics to your monitoring system. Unlike histograms that send raw bucket counts and let the server calculate percentiles, summaries compute approximate percentiles locally and report pre-calculated values like the median (p50), p95, or p99.

Think of it like this: if a histogram is like sending your raw test scores to the teacher who calculates your grade, a summary is like calculating your own grade average before submitting just the final number.

How Summaries Work

Summaries track a sliding time window of observations (e.g., last 5 minutes) and use algorithms like t-digest or quantile sketches to maintain approximate percentile values in memory. When scraped, they report:

  • Pre-calculated quantiles (e.g., 0.5, 0.95, 0.99)
  • Total count of observations
  • Sum of all values

This happens entirely on the application side, before metrics ever reach your monitoring backend.

Trade-offs vs Histograms

Advantages:

  • More accurate percentiles for single-instance monitoring
  • Lower storage requirements (only final quantiles sent)
  • No bucket configuration needed

Disadvantages:

  • Cannot aggregate across services (you can't average p95s meaningfully)
  • Client-side CPU and memory overhead
  • Fixed time windows mean delayed visibility
  • Limited flexibility—quantiles chosen upfront

When to Use Summaries

Use summaries when monitoring a single service instance where you need accurate percentiles but won't aggregate across multiple servers. For distributed systems, histograms usually win because they support aggregation.

Key Takeaway:
Summaries calculate percentiles client-side for accurate single-instance metrics, but sacrifice the aggregation flexibility that histograms provide in distributed environments.