Enforcing Observability Contracts in CI/CD With Open Policy Agent

https://hackernoon.imgix.net/images/hnDrcNS3vSYYAneclDfYGA4In0Q2-aw83awy.png

At 2:07 PM on a Thursday, we shipped checkout-worker v4.11.2 to production EKS.

All 194 unit tests were green. The integration suite passed. ArgoCD synced the pods cleanly, health checks returned 200 OK, and our main Grafana overview stayed calm and green all afternoon.

We did not find out anything was wrong until 8:19 PM, when a merchant in our enterprise Slack channel asked why none of their paid orders since 2:30 PM had triggered fulfillment webhooks.

When I exec'd into one of the pods and tailed stdout, the worker was chewing through a dead-letter backlog of 1,840 failed webhook jobs. A Redis connection pool change had caused silent ECONNRESET drops on the third retry.

Why didn't PagerDuty fire? Because two weeks earlier, a developer had split handleWebhookJob() into a new module and forgotten to wrap it in our withTelemetry() helper. Zero Prometheus counters incremented. Zero OpenTelemetry spans left...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more