Prompt
How do I route critical app errors to the right on-call engineer?
Latest observation
To route critical app errors to the right on-call engineer, use an incident routing rule set that maps each error to an owner based on service, severity, environment, and time.
Practical approach
-
Tag every error Include metadata like:
- service / microservice name
- error type
- severity
- environment: prod, staging, etc.
- region / cluster
- customer impact
-
Define ownership Maintain a clear mapping:
- service A → team X
- service B → team Y
- shared platform issues → platform team
- auth/payment/checkout → specialized rotation if needed
-
Use on-call schedules Connect your erroring system to your paging tool, such as:
- PagerDuty
- Opsgenie
- Incident.io
- Grafana OnCall
Each team should have an active rotation, and the routing logic should page the currently on-call person automatically.
-
Create escalation rules If the first responder doesn’t acknowledge within a set time:
- page the backup engineer
- then the team lead
- then the broader incident channel
-
Prioritize by impact Route only truly critical errors to pages:
- customer-facing outage
- data loss risk
- security incident
- payments broken
- sustained error-rate spike
Non-critical errors should go to logs, alerts, or tickets instead of paging.
-
Automate with alert rules Example logic:
- if
env == prod - and
severity == critical - and
service == checkout - and
error_rate > threshold - then page
checkout-oncall
- if
Simple routing example
IF prod + critical + service=auth -> auth on-call
IF prod + critical + service=billing -> billing on-call
IF prod + critical + unknown service -> platform on-call
IF staging or dev -> Slack/ticket only
Best practices
- Keep ownership data current
- Make alert routing deterministic and transparent
- Deduplicate repeated errors to avoid alert storms
- Use runbooks linked in the alert
- Test paging regularly with fire drills
If you want, I can also show you how to set this up in a specific tool like PagerDuty, Opsgenie, Datadog, or Prometheus Alertmanager.