Raxx · internal docs

internal · gated

DET-BETA-003 — Sentry error-rate spike on beta preview endpoints

Rule ID: DET-BETA-003 Title: Sentry error rate > 3σ above 7-day baseline on /api/beta/preview/* routes Category: beta Last validated: 2026-06-12 (beta-launch campaign) State: dormantsentry_backend flag is OFF in prod (prerequisite P2 from June 4 catalog). Once the flag is on and SENTRY_DSN_BACKEND is set, this rule activates immediately. The beta-launch window makes P2 urgent — see escalation note below.

Why this detection exists

The beta preview routes are new, complex, and making a cross-service HTTP call (Raptor → Console via beta_token_verifier.py) on every single request. Error-rate spikes on these routes can signal:

  1. Operational failure: Console's internal verify endpoint is down or the INTERNAL_API_SECRET mismatch between the two apps — causes RuntimeError in every token verification attempt, producing 500s for all beta testers.
  2. Adversarial probing: unusual error patterns (405 Method Not Allowed bursts, 400 bad-request bursts on well-formed endpoints) can indicate boundary-probing by a scanner that found the endpoint.
  3. Beta-launch regression: a bug in the just-deployed preview route that only manifests under real-user load (not caught by pre-launch tests).

The existing ops_sentry_error_rate_spike rule (DET-OPS-002 from June 4 catalog) applies across all routes but its baseline is the entire app. The beta routes need a route-specific detection that fires on a surge in those paths before the global rule catches it in aggregate.

Telemetry source

Escalation note — P2 urgency on beta-launch day

sentry_backend is currently OFF in prod. With real testers hitting these routes today, flying blind on server errors is a HIGH operational risk — bugs manifest at first-real-user volume that synthetic tests miss. This is an immediate operator-action recommendation:

Recommendation to operator (not an auto-action): flip sentry_backend ON and set SENTRY_DSN_BACKEND today before invite emails go out. Command (from feedback_bootstrap_via_heroku):

heroku config:set sentry_backend=1 SENTRY_DSN_BACKEND=<dsn from Infisical> \
  --app raxx-api-prod >/dev/null 2>&1

Routing: sre-agent to confirm DSN is present in vault and flag is promotion-ready.

Statistical method + baseline window

Threshold + expected FP rate

Alert route

Escalation owner

Specific error signatures to watch

Sentry exception class / log pattern Likely cause Who to escalate to
RuntimeError: beta_token_verifier: Console returned 403 INTERNAL_API_SECRET mismatch between raxx-api-prod and raxx-console-prod sre-agent (config var sync)
beta_token_verifier: Console request timed out x3+ in 5 min Console app overloaded or down sre-agent
beta_preview.*_get db_error Postgres connection issue on beta_preview_progress table sre-agent
beta_preview.screen5_post db_error Schema mismatch (column rename in 0031 migration not applied cleanly) feature-developer
5xx with no exception in Sentry Heroku router timeout or dyno OOM sre-agent

Test fixture / synthetic positive

See _fixtures/preview_sentry_error_spike_positive.json — 5 synthetic Sentry events for transaction=/api/beta/preview/synth-scraper-token-001/screen/1 with exception class RuntimeError occurring within a 3-minute window.

What NOT to do