Skip to main content
Lexicon
Lexicon
Metrics

Metrics

Difficulty: Introductory
4 min read
Updated 2026-08-29

In plain English

Plain definition

Metrics are numbers collected over time that describe how a system is behaving, such as how many requests it handled, how long they took, or how much memory it used. Teams watch metrics to notice when something is wrong and to check whether a fix worked.

What a metric is made of

Each metric is a named value, typically tagged with labels or dimensions, sampled or aggregated at regular intervals and stored for query and alerting. Common metric types include counters (monotonically increasing totals, such as request counts), gauges (point-in-time values, such as queue depth), and histograms or summaries (distributions, such as request latency percentiles). Metrics are distinct from logs, which are discrete event records, and from traces, which capture the path of an individual request through a system.

What teams use metrics for

Alerting, capacity planning and incident response all rest on metrics. Service level indicators (SLIs) such as error rate and latency are usually derived from metrics, and service level objectives (SLOs) define acceptable thresholds against them. Cardinality needs care. Unbounded label values (for example, embedding a user ID as a metric label) can overwhelm a metrics backend’s storage and query performance.

How metrics reach a dashboard

Metrics are typically produced by application or infrastructure instrumentation, collected by an agent or exposed via a scrape endpoint, stored in a time-series database, and visualised or alerted on through a dashboard or alerting layer. The pipeline runs alongside the logging and tracing systems, usually correlated with them, as part of a wider observability architecture.

Alerting on a web service’s 5xx rate

A web service exposes a counter named http_requests_total with labels for HTTP method and status code, and a histogram named http_request_duration_seconds. A monitoring system scrapes these values periodically, and an alert rule fires if the rate of 5xx responses exceeds a defined threshold over a rolling window.

Metrics do not replace logs or traces

Metrics are often mistaken for a complete substitute for logs or traces. A metric tells you that a problem exists and roughly its scale, but it cannot by itself explain why a specific request failed. For that you typically need correlated log entries or a trace. Treating metrics as sufficient evidence for root cause, without corroborating detail, is a common source of misdiagnosis.

Terms used with metrics

  • Observability
  • Time-series database
  • Service level indicator (SLI)
  • Service level objective (SLO)
  • Logging
  • Tracing

Further Reading and Validation

Before relying on a new or changed metric in production alerting, validate it in a non-production or isolated environment. Check that the metric is emitted with the expected name, labels and type, that the collection interval and retention meet the intended use, and that any alert rule built on it fires and clears correctly against a controlled test signal. If a metric definition is later changed or removed, keep the prior definition and any dependent dashboards or alerts available until the replacement has been validated, so that no monitoring coverage is lost unnoticed during the transition.

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

Found this useful? Follow KBY for more like it.

More from KBY that goes with this term.