← Back to microservices patterns map
📊
Microservices Pattern

Metrics & Monitoring

Emit numeric service and resource measurements for dashboards and alerts.

metrics

Detailed Description

Metrics show trends and health over time. They are ideal for alerts and capacity questions.

Choose labels carefully because unbounded cardinality can overwhelm metrics storage.

Visual Diagram

RED Method (per service)
  Rate     → requests per second
  Errors   → error rate %
  Duration → p50, p95, p99 latency

USE Method (per resource)
  Utilization  → CPU/Memory %
  Saturation   → queue depth
  Errors       → error count

Tradeoffs

Pros

Alerting, capacity planning, SLA/SLO tracking

Cons

High cardinality can become expensive

Examples: Prometheus + Grafana, Datadog, New Relic