- Set Sentry user context (id, username) in Journal root for all routes - Tag Planner errors with session_id - Use reactRouterV7BrowserTracingIntegration for route-aware traces - Hidden source maps (no sourceMappingURL in bundles, .map deleted after upload to Sentry) - Privacy manifest at /privacy documenting all data collection - robots.txt blocking all bots on both apps - Suppress i18next promotional console log Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.4 KiB
1.4 KiB
Why
Sentry is deployed but errors lack context — we don't know which user or session triggered them, route-level performance is invisible, and source maps are served to clients unnecessarily. These gaps make debugging harder and leak internal details.
What Changes
- Set Sentry user context when a Journal user is authenticated (user ID, username)
- Tag Planner errors with the session ID for debugging
- Replace generic
browserTracingIntegrationwithreactRouterV7BrowserTracingIntegrationfor route-aware performance traces - Configure Vite to produce source maps as
hidden(uploaded to Sentry but not referenced in the bundle, so browsers don't fetch them) - Wrap server-side request handlers with Sentry error capturing for unhandled exceptions
Capabilities
New Capabilities
(None — this enhances the existing Sentry integration, no new behavioral capabilities.)
Modified Capabilities
infrastructure: Adding Sentry context enrichment and source map handling to the deployment pipeline
Impact
- Files:
entry.client.tsx(both apps),entry.server.tsx(journal),server.ts(planner),vite.config.ts(both apps), Journal root loader or layout - Dependencies: No new packages —
@sentry/reactand@sentry/nodealready support all features - APIs: No API changes
- Security: Source maps no longer served to clients (currently
.mapfiles are publicly accessible)