SLO Runbook
This runbook defines the Service Level Objectives for Factory apps and the alert thresholds used to enforce them.SLO targets
| Metric | Target | Measurement window |
|---|---|---|
| Availability | ≥ 99.9% | Rolling 30 days |
| p99 latency | < 200 ms | Rolling 24 hours |
| Error budget | < 0.1% 5xx | Rolling 30 days |
| Successful deploys | 100% (no broken builds) | Per release |
Error budget
With a 99.9% availability target:- Monthly error budget: 43.8 minutes of downtime
- Budget burn rate alert at: 5× burn rate (depletes budget in 6 days)
Sentry alerts
Sentry is the primary error monitoring system. DSN is set viaSENTRY_DSN Worker secret.
Recommended alert rules
| Alert | Condition | Priority |
|---|---|---|
| Error spike | > 10 errors/minute (new issues) | Critical |
| High error rate | 5xx rate > 1% over 5 minutes | High |
| P99 degradation | Not available in Sentry — use Cloudflare Analytics | |
| New issue (first seen) | Any new InternalError | Medium |
Example Sentry alert (via Sentry API)
Cloudflare Analytics alerts
Use Cloudflare Workers Analytics for latency and request rate monitoring. In Cloudflare Dashboard → Workers → → Metrics:- Set alert: Error rate > 1% over a 5-minute window → notify via email
- Set alert: P99 CPU time > 50ms (as a proxy for latency) → notify via email
PostHog funnel monitoring
PostHog tracks business-level events via@adrper79-dot/analytics.
Key funnels to monitor:
- Signup funnel:
user_signup→email_verified→first_action - Conversion funnel:
page_view→cta_click→checkout_started→subscription_created
- Conversion drop > 20% week-over-week
subscription_createdevents drop > 10% day-over-day
Incident response
- P1 (site down): Immediate rollback via
wrangler rollback --env production, notify in #incidents. - P2 (elevated errors): Investigate Sentry, check recent deploy, consider rollback.
- P3 (latency degradation): Check Neon query performance, review Hyperdrive health.
- P4 (business metric drop): Review PostHog funnels, check for A/B test side effects.
On-call rotation
Factory apps are currently operated by a single team. Establish PagerDuty rotation when:- Monthly active users > 1,000 per app
- Revenue per app > $5,000 MRR