Free — no signup required

Introduction: What Are Metrics?

2 min read

The Dashboard Data

When you look at a monitoring dashboard and see a line chart showing CPU usage over time, or a big number showing the total requests per second, you are looking at metrics.

A metric is a numerical measurement collected over time. It tells you "how much" of something exists at a specific moment. Think of it like a doctor taking your vital signs — pulse, blood pressure, temperature — each reading is a single number that, tracked over time, reveals the health of the whole system.

Why Do We Need Them?

Metrics are the foundation of observability. They are usually the first line of defense because they are cheap to collect and store, and they are excellent at showing you trends and triggering alerts.

They help answer questions like:

  • "Is my application slower today than it was yesterday?"
  • "Am I about to run out of disk space?"
  • "How many users are currently logged in?"
  • "Did my last deployment increase the error rate?"

While logs tell you what happened in detail, and traces tell you where in the call chain something went wrong, metrics tell you the overall health and performance of the system at a glance. Metrics are the signal that wakes you up at 3am; logs and traces are what you use to diagnose the problem once you're awake.

The Anatomy of a Metric Data Point

Every metric data point has three components:

  1. A name — a human-readable identifier like http_requests_total or memory_usage_bytes.
  2. A value — the numerical measurement at that moment, like 4821 or 0.73.
  3. A timestamp — when the measurement was taken, like 1718000000.

When you collect thousands of these data points over time for the same metric name, you get a time-series: a sequence of (timestamp, value) pairs that you can graph, query, and alert on.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free