Skip to main content

SLO Runbook

This runbook defines the Service Level Objectives for Factory apps and the alert thresholds used to enforce them.

SLO targets

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 via SENTRY_DSN Worker secret. Configure in Sentry → Alerts → Create Alert Rule → Issue Alerts.

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
These can also be configured via Cloudflare Notifications:

PostHog funnel monitoring

PostHog tracks business-level events via @latimer-woods-tech/analytics. Key funnels to monitor:
  • Signup funnel: user_signup → email_verified → first_action
  • Conversion funnel: page_view → cta_click → checkout_started → subscription_created
Set PostHog Insights → Funnel alerts for:
  • Conversion drop > 20% week-over-week
  • subscription_created events drop > 10% day-over-day

Incident response

  1. P1 (site down): Immediate rollback via wrangler rollback --env production, notify in #incidents.
  2. P2 (elevated errors): Investigate Sentry, check recent deploy, consider rollback.
  3. P3 (latency degradation): Check Neon query performance, review Hyperdrive health.
  4. 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