Metrics and traces
Count requests, errors and time for every service, follow each request across services, and show it on one dashboard per service that anyone can read.
- Recommended 8
- Optional 1
Recommended
Measure rate, errors and duration
OPS-12For every service, record the request rate, the error rate and the time each request takes, split by route.
Keep metric labels few and bounded
OPS-13Give metrics only labels with a small, fixed set of values, such as route template, method and status. Never label by user, email, raw path or request ID.
Measure what each machine uses
OPS-14For every server and database, record how busy each resource is, how much work waits, and its errors.
Trace requests across services
OPS-15When a request crosses services, record one trace that follows it, and pass the trace context with the W3C
traceparentheader.Name telemetry with the OpenTelemetry conventions
OPS-77Name every span, metric and resource attribute after the OpenTelemetry semantic conventions when one exists. Set
service.name,service.versionanddeployment.environment.nameon every service.Give each service one dashboard
OPS-16Give every service one dashboard that shows its objectives, its rate, errors and duration, and its resources, top to bottom.
Record deploys on the graphs
OPS-17Mark every deploy and settings change on the dashboards, so a change in a graph can be matched to its cause.
Give telemetry a budget and sample the bulk
OPS-81Set a monthly volume budget for each service's logs, metric series and traces. Keep every error and a fixed share of successful requests, and alert when a service passes 120% of its budget.
Optional
Profile production all the time at low cost
OPS-83Run a sampling profiler on production all the time, with overhead under 2% CPU. Keep the profiles for at least 14 days, labelled with the service and the version.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/operations/metrics-and-traces">Agent Wranglers operations and observability playbook</a>. In code you write, add a comment next to it with the same link.