CompCode Academy

Lesson 3 of 4 · Free to read

Session guide

Session guide — Metrics & Logs: PromQL, Alerting, Loki

Visual companion to the Lesson. Use in study groups or when you want the diagram first.

Watch

Course video

Open on YouTube
How Prometheus Monitoring works — Prometheus scrape, TSDB, and alert architecture used in MNCs.

Course video

Open on YouTube
Grafana Loki: Centralized Logging Without the Cost — Label-indexed logs — the Loki mental model for cheap, queryable logs.

Flow

60-second summary

A spike hits /orders. Without PromQL and structured logs you guess. With recording rules + LogQL you jump from alert → series → log line in one pane.

MNC 2026: Platform teams standardize Prometheus recording/alerting rules as code, Alertmanager routing/inhibition, and Loki label budgets — not full-text ELK for every line.

Chunks

  • PromQL that production uses: rate, irate, histogram_quantile, recording rules for expensive queries, alert on symptoms not causes.
  • Alertmanager is a product: Grouping, inhibition, and silences prevent page storms — same pattern MNCs use with PagerDuty/Opsgenie.
  • Loki indexes labels, not every token: Keep label cardinality tiny; put high-cardinality fields in the line or structured metadata.
  • Logs capstone triage: Given only telemetry, reconstruct an incident timeline without SSH.

Session guide — Metrics & Logs: PromQL, Alerting, Loki.

New free lessons and course updates. Unsubscribe from any email.