Skip to content

Conversation

@yilmazbahadir
Copy link
Contributor

Summary

Add Sentry error monitoring and performance tracking to lattice-manager. This provides real-time error tracking, performance monitoring, and session replay capabilities to help identify and debug production issues.

Changes

  • Added @sentry/react (v10.17.0) for error monitoring
  • Initialized Sentry SDK in src/index.tsx with:
    • Browser tracing for performance monitoring
    • Session replay (10% of sessions, 100% on errors)
    • Release tracking via APP_VERSION
  • Added Error Boundary in src/App.tsx to catch React errors with fallback UI
  • Added environment variables:
    • VITE_SENTRY_DSN - Sentry project DSN
    • VITE_SENTRY_ENVIRONMENT - Environment name (defaults to "production")
  • Updated Vite config to expose Sentry config as global constants
  • Added TypeScript declarations for Sentry globals

Configuration

  1. Go to the Sentry project at https://sentry.io
  2. Add to .env:
    VITE_SENTRY_DSN=https://your-dsn@sentry.io/project-id
    VITE_SENTRY_ENVIRONMENT=production
  3. Sentry will initialize automatically if DSN is provided

Test plan

  • Set VITE_SENTRY_DSN in .env
  • Run npm start
  • Trigger test error in browser console: throw new Error("Test")
  • Verify error appears in Sentry dashboard
  • Verify session replay is captured
  • Verify release version is tracked

@netbonus netbonus merged commit dc27fd6 into master Oct 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants