Menu

Post image 1
Post image 2
1 / 2
0

Observability as Code: Managing Dashboards and Alerts with Terraform

DEV Community·Samson Tanimawo·about 1 month ago
#tf1NHjvy
Reading 0:00
15s threshold

The Problem with Click-Ops Dashboards Your team has 200 dashboards. You don't know who owns them. Half are broken. The rest show yesterday's reality. This is click-ops debt, and it compounds faster than code debt. Observability as Code Every dashboard, alert, and SLO definition should live in a Git repository alongside your service code. resource "datadog_dashboard" "api_gateway" { title = "API Gateway - Golden Signals" description = "Owner: @platform-team" layout_type = "ordered" widget { timeseries_definition { title = "Request Rate (per second)" request { q = "sum:api.requests{service:gateway}.as_rate()" } } } widget { timeseries_definition { title = "P99 Latency" request { q = "max:api.latency{service:gateway}.as_count()" } } } } Enter fullscreen mode Exit fullscreen mode This lives next to main.tf for your service. When you deploy the service, you deploy the observability. Benefits That Compound 1. Ownership is clear. The file has a CODEOWNERS entry. PRs require review. 2. Dashboards auto-update.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More