Observability: APM
This course covers Application Performance Monitoring for a Rails application, built on metrics. It explains what metrics answer that logs and traces cannot, and how ActiveSupport::Notifications events feed every APM agent. It covers the four golden signals, RED and USE, and why percentiles describe latency better than averages. Instrumentation code follows for requests, queue time, jobs, cache and saturation. Later lessons cover symptom-based alerts, error budgets and burn rates, what drives the cost of a tool, and a complete dashboard and alert setup.
What you'll learn
- ✓How Rails instrumentation events supply the numbers behind APM
- ✓The four golden signals, RED and USE, and which metrics to leave out
- ✓Why percentiles beat averages, and the limits of Apdex and histograms
- ✓Instrumenting requests, queue time, jobs, cache and saturation in Rails
- ✓Symptom-based alerts, error budgets and burn-rate policies
- ✓Comparing monitoring tools and the costs of hosts, cardinality and retention
What APM answers that logs do not
Two courses ago you had structured logs, then traces. Both answer questions about one thing that happened. Neither answers the question you get asked first, which is some version of "is the site all right?"
Read the full lesson free →Curriculum
7 lessonsWhat APM answers that logs do not
Explains how metrics answer whether a system is healthy and how ActiveSupport::Notifications events feed APM agents.
The metrics worth having
Covers the four golden signals, Rails-specific metrics, RED and USE, and which numbers to leave off dashboards.
Percentiles, averages, and Apdex
Shows why averages mislead, why percentiles cannot be averaged across hosts, and how Apdex and histogram buckets work.
Instrumenting this application
Adds request, queue time, job, cache, business and saturation metrics to the application using subscribers and gauges.
Alerts that people act on
Defines alerts on symptoms with duration windows, runbooks and owners, plus error budgets and burn-rate alerting.
Choosing and paying for a tool
Compares hosted APM, Prometheus and OpenTelemetry, and explains how hosts, cardinality and retention drive the bill.
Putting it together: a monitoring setup
Assembles the instrumentation, a one-screen dashboard and two symptom-based alerts with runbooks for this application.