feat: add Sentry error tracking with defensive error boundary

- Initialize Sentry SDK in index.tsx when VITE_SENTRY_DSN env var is set
- Wrap entire App with Sentry.ErrorBoundary (replaces the hard crash with a retry UI)
- 5% trace sample rate, sendDefaultPii disabled, strip events containing accessToken
- Add .env.production template with VITE_SENTRY_DSN placeholder
- Get your DSN from sentry.io -> Project Settings -> Client Keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lotus Bot
2026-05-21 19:44:51 -04:00
parent 9ebe9410aa
commit 538b3032a0
5 changed files with 185 additions and 28 deletions
+4
View File
@@ -0,0 +1,4 @@
# Sentry DSN — get from sentry.io → Project Settings → Client Keys
# VITE_SENTRY_DSN=https://xxx@oXXX.ingest.sentry.io/YYYY
VITE_SENTRY_DSN=
VITE_APP_VERSION=lotus