Stage 7 · Master
Observability & Developer Experience Metrics
Platform SLIs and SLOs
Define platform SLIs: API latency, scaffold-to-deploy time, environment provisioning time, CI queue time. Error budgets for platform.
Why Platform SLIs?
Platform teams often measure infrastructure health (cluster up, API server latency) but miss developer experience. Platform SLIs measure the platform from the developer's perspective: how fast can I scaffold? How long until my code deploys? How often does CI queue block me?
| Infrastructure SLI | Platform SLI | Why It Matters |
|---|---|---|
| API server latency (p99) | Platform API latency (p99) | Developer waits for every CLI command |
| Cluster CPU utilization | Scaffold-to-deploy time (p50) | Measures end-to-end developer flow |
| Node count | Environment provisioning time (p95) | Preview env speed = iteration speed |
| etcd latency | CI queue time (p95) | Queue time = wasted developer time |
| Pod restart rate | Golden path adoption rate | Adoption = platform value delivery |
| Disk pressure | Developer NPS (quarterly) | Subjective but critical |
Key Platform SLIs
| SLI | Definition | Target | Measurement |
|---|---|---|---|
| Scaffold Success Rate | % of platform scaffold commands completing without error | ≥99.5% | CLI telemetry + API logs |
| Scaffold-to-Deploy Time (p50) | Time from successful scaffold to first production deploy | <15 min | Git webhook → ArgoCD sync → deployment |
| Scaffold-to-Deploy Time (p95) | Same, 95th percentile | <45 min | Same |
| Environment Provision Time (p95) | Time from PR open to preview URL ready | <3 min | GitHub webhook → namespace + ArgoCD + deps |
| CI Queue Time (p95) | Time from push to CI start | <5 min | GitHub Actions / GitLab CI queue metrics |
| Platform API Latency (p99) | p99 latency for mutating API calls | <500ms | API gateway / load balancer metrics |
| Platform API Availability | % of time API returns 2xx/4xx (not 5xx) | 99.9% | Uptime monitor / synthetic checks |
| Golden Path Adoption | % of new services using golden path templates | >80% | Catalog: services with platform/golden-path label |
| Template Drift Detection Time | Time to detect golden path repo divergence from template | <24h | Scheduled template diff job |
| Developer NPS | Quarterly survey: 'How likely to recommend platform?' | >30 | Survey tool (Delighted, Typeform) |
Defining SLOs
SLO = SLI target over a time window. Platform SLOs use rolling windows (28 days for most, 7 days for latency). Error budget = 100% - SLO target.
apiVersion: platform.example.com/v1
kind: PlatformSLO
metadata:
name: platform-slos
spec:
slos:
- name: scaffold-success-rate
sli: scaffold-success-rate
target: 99.5
window: 28d
description: "99.5% of scaffold commands succeed"
- name: scaffold-to-deploy-p50
sli: scaffold-to-deploy-time
target: 900 # 15 minutes in seconds
percentile: 50
window: 28d
description: "50% of services deploy to prod within 15 min of scaffold"
- name: scaffold-to-deploy-p95
sli: scaffold-to-deploy-time
target: 2700 # 45 minutes
percentile: 95
window: 28d
- name: preview-env-provision-p95
sli: environment-provision-time
target: 180 # 3 minutes
percentile: 95
window: 28d
- name: ci-queue-time-p95
sli: ci-queue-time
target: 300 # 5 minutes
percentile: 95
window: 7d
- name: api-latency-p99
sli: platform-api-latency
target: 500 # milliseconds
percentile: 99
window: 7d
- name: api-availability
sli: platform-api-availability
target: 99.9
window: 28d
- name: golden-path-adoption
sli: golden-path-adoption-rate
target: 80
window: 28d
- name: template-drift-detection
sli: template-drift-detection-time
target: 24 # hours
window: 28d
SLOs as code: versioned, reviewable, deployable. Each references an SLI definition with target, window, percentile.
Error Budgets
Error budget = (1 - SLO target) × time window. Platform team spends error budget on: new features, tech debt, migrations. When budget exhausted → freeze non-critical changes, focus on reliability.
| SLO | Target | Error Budget (28d) | Budget Exhausted Action |
|---|---|---|---|
| Scaffold Success | 99.5% | 3.36 hours of failures | Freeze new template features, fix flaky scaffold steps |
| Scaffold-to-Deploy p50 | 15 min | N/A (latency budget) | Investigate CI/CD bottlenecks, optimize ArgoCD sync |
| Preview Env p95 | 3 min | N/A | Scale preview node pool, optimize dependency provisioning |
| CI Queue p95 | 5 min | N/A | Add CI runners, optimize test parallelization |
| API Latency p99 | 500ms | N/A | Profile API, add caching, scale replicas |
| API Availability | 99.9% | 40.3 min downtime | Incident response, postmortem, reliability sprint |
| Golden Path Adoption | 80% | N/A (rate budget) | Improve templates, reduce escape hatches, better DX |
Measurement & Implementation
- CLI Telemetry: OpenTelemetry in CLI, send spans to platform OTel collector
- API Metrics: Prometheus metrics on API gateway (latency, errors, rate)
- GitHub/GitLab API: Webhooks for PR events, workflow runs, deployment status
- ArgoCD Metrics: Application sync status, sync duration, health
- Kubernetes Metrics: kube-state-metrics + custom metrics for platform resources
- Survey Tool: Quarterly NPS via Delighted/Typeform, linked to user identity
Alerting on SLOs
Alert on error budget burn rate, not absolute thresholds. Multi-window, multi-burn-rate alerting (Google SRE workbook).
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: platform-slo-burn-rate
namespace: monitoring
spec:
groups:
- name: platform-slo-burn-rate
rules:
# Fast burn: 2% budget in 1h (14.4x normal rate)
- alert: PlatformSLOFastBurn
expr: |
(
(1 - platform_scaffold_success_rate_5m) / (1 - 0.995)
) > 14.4
for: 2m
labels:
severity: critical
team: platform
annotations:
summary: "Platform scaffold success rate burning error budget fast"
description: "Burn rate > 14.4x normal. Error budget exhausted in <1h at current rate."
runbook_url: "https://runbooks.platform.example.com/scaffold-failures"
# Slow burn: 10% budget in 6h (4x normal rate)
- alert: PlatformSLOSlowBurn
expr: |
(
(1 - platform_scaffold_success_rate_1h) / (1 - 0.995)
) > 4
for: 15m
labels:
severity: warning
team: platform
annotations:
summary: "Platform scaffold success rate burning error budget"
description: "Burn rate > 4x normal. Error budget exhausted in <6h at current rate."
# API latency burn rate
- alert: PlatformAPILatencyBurn
expr: |
histogram_quantile(0.99, rate(platform_api_request_duration_seconds_bucket[5m])) > 0.5
for: 5m
labels:
severity: warning
team: platform
annotations:
summary: "Platform API p99 latency > 500ms"
description: "API latency SLO at risk. Check API gateway, upstream dependencies."
Multi-window burn rate alerts: fast burn (2% budget in 1h) = critical, slow burn (10% in 6h) = warning. Based on Google SRE workbook.
Mark this lesson complete to store local progress and unlock a cleaner resume path the next time you visit.