Observability

All Topics

Signal 2: Metrics-Based Monitoring

Metrics endpoint example

  • Periodically samples numeric values — Instead of recording every single event, the system collects aggregated measurements such as request count, latency, CPU usage, or memory consumption at regular intervals.
  • Data is stored in a time-series database — Metrics are saved in systems like Prometheus and visualized through dashboards and alerts, enabling trend analysis over time.
  • Loses per-event detail but keeps insight through labels and dimensions — While you don't see each individual request, you can break down data using labels (e.g., service, endpoint, status code), which still provides powerful analytical capabilities.
  • Significantly more cost-efficient than logs at scale — Because metrics are aggregated numeric values, they require far less storage and processing, making them orders of magnitude cheaper in high-traffic environments.