Observability12 min readPublished: 2026-09-15

Full-Stack Observability: Implementing Prometheus, Alertmanager, and Grafana

Set up the four golden signals of monitoring, write high-precision PromQL alerting queries, and eliminate alert fatigue across your cloud infrastructure.

CPL

CloudPlatformLabs Engineering

Platform Architecture Team

Back to all guides

1. The Four Golden Signals of Distributed Systems

Effective monitoring avoids instrumenting arbitrary metrics that distract on-call engineers. Instead, base your core service dashboards and alerting rules on the Four Golden Signals defined by Google Site Reliability Engineering: Latency, Traffic, Errors, and Saturation.

Prometheus collects multi-dimensional time series metrics via HTTP pull scraping. With PromQL, we can calculate rate of errors, 99th percentile request latency, and thread saturation with sub-second precision.

prometheus-alerts.yaml
groups:
- name: api-service-alerts
  rules:
  # High Error Rate Alert (> 2% 5xx errors over 5 minutes)
  - alert: HighHttpErrorRate
    expr: |
      sum(rate(http_requests_total{status=~"5.."}[5m]))
      /
      sum(rate(http_requests_total[5m])) * 100 > 2
    for: 5m
    labels:
      severity: critical
    annotations:
      summary: "High HTTP 5xx error rate detected on {{ $labels.service }}"
      description: "Error rate is currently {{ $value | printf '%.2f' }}% on namespace {{ $labels.namespace }}"

2. Measuring Latency Correctly with Histograms

Averages lie. If 95% of users receive a response in 50ms but 5% wait 10 seconds, average latency looks healthy while your most valuable users experience catastrophic latency. Use Prometheus histograms with `histogram_quantile` to measure p95 and p99 latency distributions.

latency-p99.promql
histogram_quantile(
  0.99,
  sum(rate(http_request_duration_seconds_bucket{job="api"}[5m])) by (le)
)

Related Topics & Tags

PrometheusGrafanaObservabilityDevOpsKubernetesAlerting
CPL

Written by CloudPlatformLabs Engineering

Platform Architecture Team

CloudPlatformLabs publishes independent, peer-reviewed cloud and DevOps architecture blueprints, hands-on tutorials, and infrastructure case studies. Our mission is to make advanced infrastructure engineering transparent, resilient, and developer-friendly.