Platform engineering and SRE

Stage 2 · Lesson 3 of 7

PromQL you use every week

Observability: metrics, logs and traces

is the query language behind dashboards, and alerts. A handful of patterns cover most of the work. rate(counter[5m]) turns a counter into a per-second rate. sum by (service) (...) aggregates across pods while keeping one .

An error ratio divides the rate of 5xx responses by the rate of all responses. histogram_quantile(0.99, sum by (le) (rate(bucket[5m]))) reads p99 latency from a histogram. Recording rules precompute expensive expressions, such as the error ratio per service, so dashboards and alerts stay fast and consistent. Practise in the Prometheus expression browser against a real app.

Common trapsumming before taking rate(), or dropping the le label before histogram_quantile(), which returns wrong numbers without any error.

A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

Keep handy

Also worth your time

Mark this stage as not done?