Interview Prep/Monitoring & Observability/Alerting Strategy, SLOs & Runbooks

How do you handle alerts across environments (dev, staging, prod)?

BeginnerProductionAlerting Strategy, SLOs & Runbooks
Answer

Use the same rules everywhere (rules are code, tested in lower environments first) but route by an env external label: prod pages, staging goes to a Slack channel, dev goes nowhere or to the owning team's channel. Never page anyone for dev.

route:
  routes:
    - matchers: [ env="prod", severity="page" ]
      receiver: pagerduty-payments
    - matchers: [ env=~"staging|dev" ]
      receiver: slack-nonprod
All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Alerting Strategy, SLOs & Runbooks