# Sentry DSN Recovery — 2026-05-11

Context: Task 2.5 prod activation hit a placeholder DSN (`PASTE_REAL_DSN_HERE`)
which Sentry's OptionsResolver rejected during `config:cache`. Combined with
the preceding `config:clear`, prod went 500-on-every-request until the real
DSN was pasted. Authorized one-time `.env` write on prod.

## Step 1 — strip prior SENTRY_LARAVEL_DSN entries

    sed -i '/^SENTRY_LARAVEL_DSN=/d' .env
    grep -c '^SENTRY_LARAVEL_DSN=' .env

Result: `0` (grep exit 1 is "no match", not a failure).

## Step 2 — append real DSN, verify (truncated)

    grep '^SENTRY_LARAVEL_DSN=' .env | head -c 80

Output:

    SENTRY_LARAVEL_DSN=https://4295f072c27929a3db47ddc253bbe635@o4511358339645440.in

## Step 3 — config refresh

    php artisan config:clear   →  Configuration cache cleared successfully.
    php artisan config:cache   →  Configuration cached successfully.
    chown -R www-data:www-data storage bootstrap/cache  →  (no output)

## Step 4 — verification

    health:200
    sentry-test:500

Prod recovered. Sentry test endpoint fires as designed (deliberate throw).
Pam to confirm event lands in Sentry dashboard within ~30s.

## Outstanding

- Task 2.5/2.8 remaining work (BACKUP_S3_* validation, crontab line,
  backup:run, backup:list) still pending — original Task 2.5+2.8
  activation run was halted at Step 2 by this incident.
