📈Metric (Monitoring)
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
Example code
prometheus
# TYPE http_requests_total counter
http_requests_total{method="post",code="200"} 1027
http_requests_total{method="post",code="400"} 3Common mistake
Key takeaways
- 1A number over time. Each reading keeps its timestamp.
- 2Cheap to keep. Small enough to store for months.
- 3Labels split it. Tags like method or status code.