Files
magnus919_agent-skills/platform-engineering/templates/observability-contract.md
T
Magnus HedemarkGitHubfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
abe1ab3a00 feat(skill): thicken platform-engineering with evals, templates, and deeper cloud/IaC references (#255)
Add platform-engineering/evals/evals.json (schema v1, 6 output-quality
cases covering CI/CD pipeline design, IaC review, observability strategy,
secret-management design, cloud architecture assessment, and golden-path
self-service portal design); add three fillable templates (golden-path
self-service portal, IaC review record, observability contract); and deepen
references/cloud-platforms.md and references/infrastructure-as-code.md with
decision guidance and dated sources. SKILL.md and README updated to surface
the new templates and evals.

Closes #238

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-08-03 14:50:00 -04:00

4.2 KiB

title, doc_id, status, created, last_modified, owner, approver
title doc_id status created last_modified owner approver
Observability Contract: [Service Name] OBC-[SERVICE-CODE]-[VERSION] draft | reviewed | approved | superseded
YYYY-MM-DD
YYYY-MM-DD
[Service Owner / Team] [SRE / Platform Lead]

Observability Contract — [Service Name]

1. Service Context

Field Value
Service Name [Service Name]
Owner [Team / Individual]
Environments [dev, staging, prod]
Dependencies [Upstream/downstream services, data stores]
SLO reference [Link to SLO declaration or error budget policy]

2. Signals Required

Every service must emit all three signals before production traffic is accepted.

2.1 Metrics

Metric Type Name Definition
Request rate Counter [fill: e.g., svc_http_requests_total] [fill: label set, status split]
Error rate Counter [fill: e.g., svc_http_errors_total] [fill: which statuses count as errors]
Latency Histogram [fill: e.g., svc_http_request_duration_seconds] [fill: buckets, percentiles consumed]
Saturation Gauge [fill: e.g., svc_queue_depth] [fill: what resource is near exhaustion]
  • Scrape endpoint: [fill: e.g., /metrics on :9090] — must be reachable by the platform scraper.

2.2 Logs

  • Format: [fill: structured JSON with timestamp, level, service, trace_id, span_id]
  • Shipping: [fill: agent/target — e.g., Promtail/Alloy/Fluent Bit]
  • Retention requirement: [fill: hot/warm/cold tiers and durations]
  • Sensitive data: [fill: what must never be logged — tokens, PII, full payloads]

2.3 Traces

  • Instrumentation: [fill: OpenTelemetry SDK, auto-instrumentation, or manual spans]
  • Context propagation: [fill: W3C TraceContext across all outbound calls]
  • Sampling: [fill: head/tail sampling strategy and rate]
  • Key spans: [fill: entry, external calls, DB queries, background jobs]

3. Dashboards and Recording Rules

Artifact Name / Path in Git Content
Service dashboard [fill: provisioning path] [fill: RED panels, per row: traffic, errors, latency, saturation]
Recording rules [fill: rules file path] [fill: rate/error-duration derivations, error budget expressions]
Dashboard links [fill: links to related platform dashboards] [fill: cross-service dependency view]
  • Dashboard-as-code requirement: [fill: dashboards live in Git and change via review, not ad-hoc UI edits]

4. Alerting and Error Budgets

Alert Condition (query) Severity Routing Action
[fill: High error rate] [fill: PromQL expression] [fill: critical/warning] [fill: page/Slack] [fill: incident response, freeze, rollback]
[fill: Latency p99 breach] [fill: PromQL expression] [fill: severity] [fill: routing] [fill: action]
[fill: Budget burn rate] [fill: multi-window burn rate expression] [fill: severity] [fill: routing] [fill: action]
  • Error budget policy applied: [fill: link or reference to the team error budget policy]
  • Noise control: [fill: for: durations, deduplication, silenced maintenance windows]

5. Release and Verification Gate

Gate Requirement
Pre-release [fill: dashboards live, alerts firing correctly, metrics scraping, traces flowing]
Canary verification [fill: what SLIs are compared between canary and control and at what divergence]
Post-release [fill: regression check against baseline within N minutes, on-call notified]
  • Verification evidence: [fill: where the evidence (dashboards, alert receipts, trace samples) is recorded]

6. Ownership and Review

Item Value
Observability owner [Team / Individual]
Review cadence [Quarterly or on architecture change]
Next review date [YYYY-MM-DD]

Sign-off

Role Name Date
Service Owner [Name] [YYYY-MM-DD]
SRE / Platform Lead [Name] [YYYY-MM-DD]

This contract is part of the service's production readiness review and lives in Git next to the dashboards and rules it describes.