Skip to content
BENIBIX Learn

Metric (Monitoring)

Infrastructure📈 Monitoring & ObservabilityTelemetry Signals

Also known as Metrics, System Metric, Time Series Metric, Monitoring Metric

A number about a system, kept over time. You can draw it as a chart.

Think of it like

It is like a step counter. It keeps one number, and you can see how it changes over the day.

Example

Lucy's error-rate metric sits near 0.1% all week. On Friday it jumps to 4% one minute after a new release, so she rolls it back.

Why it matters

Metrics are what dashboards and alerts are built on. They show at a glance whether things are normal.

Definition

A metric is a number about a system, measured again and again over time. Examples are requests per second, error count or memory in use. Each reading is saved with its time, so the numbers form a line you can chart. Metrics are small and cheap, so you can keep them for months. They show trends and limits well, but not the story of one request.

Example code

prometheus
# TYPE http_requests_total counter
http_requests_total{method="post",code="200"} 1027
http_requests_total{method="post",code="400"} 3
One counter split by labels. The app has answered 1,027 good posts and 3 bad ones so far.
Metrics are the middle panel. A line over time shows the spike, but not which request caused it.

Common mistake

Adding a label with endless values, like a user ID. Each value makes a new line, and the store slows to a crawl.

Key takeaways

  1. 1
    A number over time. Each reading keeps its timestamp.
  2. 2
    Cheap to keep. Small enough to store for months.
  3. 3
    Labels split it. Tags like method or status code.