#9 13 pages

Monitoring & Observability

Metrics, logs, traces, and alerting — from Prometheus fundamentals to long-term storage and SLO-driven alerting.

Files

File Topics
prometheus.md Architecture, data model (4 types + math), TSDB internals, PromQL, scrape config, recording rules, production alerts
alertmanager.md Routing tree, grouping, inhibition, silences, complete config, debugging
grafana.md Panel types, variables, USE/RED/SLO dashboards, provisioning as code
alerting-philosophy.md Four Golden Signals, symptoms vs causes, alert fatigue, urgency tiers, runbook structure
opentelemetry.md Three pillars (traces/metrics/logs), OTEL Collector, Go SDK, auto-instrumentation
loki.md Architecture, labels vs content, LogQL, Promtail, trace correlation, Fluent Bit zero-loss pipeline
performance-debugging.md USE method, RED method, 60-second checklist, Go pprof, bpftrace one-liners
slo-sli.md SLI/SLO/Error Budget math, multi-window multi-burn-rate alerts, recording rules, decision framework
thanos-mimir.md Thanos components, Mimir distributed TSDB, long-term S3 storage, deduplication, downsampling
monitoring-scenarios.md 12 debugging scenarios with Prevention: target DOWN, missing metrics, Prometheus OOM, alert storms
distributed-tracing-backend.md Grafana Tempo architecture, TraceQL, trace-to-log correlation, service graph, Jaeger comparison
continuous-profiling.md Parca eBPF DaemonSet, Pyroscope, flame graph reading, trace-to-profile correlation, GCP Cloud Profiler
loki-ruler.md Loki ruler component, recording rules (log-to-metric), alerting from logs, ruler.yaml config, common patterns

Database-specific monitoring (PostgreSQL, MySQL, Redis, MongoDB) lives in ../sre/db-monitoring.md.

Read Order

graph LR
    A["prometheus<br/>data model, TSDB, PromQL foundation"] --> B["alertmanager<br/>routing, grouping, inhibition"]
    B --> C["grafana<br/>dashboards (USE/RED/SLO)"]
    C --> D["alerting-philosophy<br/>what to alert on, symptoms vs causes"]
    D --> E["opentelemetry<br/>traces/metrics/logs, OTEL Collector"]
    E --> F["loki<br/>log aggregation, LogQL"]
    F --> G["performance-debugging<br/>USE/RED methods in practice"]
    G --> H["slo-sli<br/>error budgets, burn-rate alerts"]
    H --> I["thanos-mimir<br/>long-term/global metric storage"]
    I --> J["monitoring-scenarios<br/>applied debugging runbooks"]
    J --> K["distributed-tracing-backend<br/>Tempo, TraceQL, Jaeger"]
    K --> L["continuous-profiling<br/>Parca, Pyroscope, flame graphs"]
    L --> M["loki-ruler<br/>log-to-metric, recording rules, alerting from logs"]

Pages in this section

1
Prometheus — Production Reference Guide
graph LR
2
AlertManager
Prometheus decides what is wrong; AlertManager decides who hears about it, how often, and whether it's worth waking someone up. It sits between rule evaluation
3
Grafana
Grafana is a visualization layer that queries data sources and renders panels. It does not store metrics — it proxies queries to backends.
4
OpenTelemetry
OpenTelemetry (OTEL) is the vendor-neutral standard for generating telemetry — one set of SDKs and one wire protocol (OTLP) work across languages and backends,
5
Loki Log Aggregation
Track how many of the checks below you clear as you go:
6
Performance Debugging Guide
Each section below closes with a quick knowledge check — track how many you've cleared as you go:
7
Monitoring & Observability Debugging Scenarios
Twelve production monitoring-stack failure patterns — Prometheus, AlertManager, Grafana, Loki, and OpenTelemetry — with the symptom, the diagnostic flow, the ro
8
SLI / SLO / Error Budgets
The Google SRE framework for measuring and managing reliability.
9
Alerting Philosophy
Every service should be monitored across these four dimensions. From the Google SRE Book.
10
Thanos and Mimir — Long-Term Metrics Storage
Prometheus stores data locally for 15 days by default. For long-term retention, global query across clusters, and high availability, you need Thanos or Mimir.
11
Distributed Tracing Backends: Grafana Tempo and Jaeger
OpenTelemetry generates traces and the Collector forwards them — but you need a backend to store, index, and query them. This guide covers Grafana Tempo (object
12
Continuous Profiling
Continuous profiling captures CPU, memory, and goroutine/thread samples from running production processes at low overhead, all the time — unlike traditional pro
13
Loki Ruler: Log-to-Metric Recording Rules and Log Alerts
Loki's ruler component mirrors Prometheus's ruler — it evaluates LogQL expressions on a schedule and produces two kinds of output: recording rules (convert log