Installation
Version Compatibility
- Remix 2.x: Fully supported (Vite & Classic Compiler)
- React Router 6.4+: Full support
- Works with all Remix runtimes (Node.js, Cloudflare Workers, Deno)
Basic Setup
Client-Side Configuration
Create or updateapp/entry.client.tsx:
Server-Side Configuration
Create or updateapp/entry.server.tsx:
Root Component Wrapper
Wrap your root component inapp/root.tsx:
Error Handling
Route Loaders
Route Actions
Component Errors
Performance Monitoring
Custom Transactions
Database Queries
Prisma Integration
Context and User Information
Setting User Context
Server-Side Context
Source Maps
For Remix with Vite, configure invite.config.ts:
Environment Variables
Add to your.env file:
Deployment Platforms
- Vercel
- Fly.io
- Cloudflare Workers
Add environment variables in Vercel dashboard:
SENTRY_DSNSENTRY_AUTH_TOKENSENTRY_ORGSENTRY_PROJECT
Best Practices
Wrap Root
Always wrap your root component with withSentry for error tracking.
Handle Errors
Use wrapHandleErrorWithSentry in entry.server.tsx.
User Context
Set user context in loaders after authentication.
Source Maps
Always upload source maps for production builds.
Troubleshooting
Errors Not Captured
Errors Not Captured
Ensure:
- Both entry.client.tsx and entry.server.tsx are initialized
- Root component is wrapped with withSentry
- DSN is correctly configured on both client and server
Performance Data Missing
Performance Data Missing
Verify:
- browserTracingIntegration is configured with Remix hooks
- tracesSampleRate is set appropriately
- React hooks (useEffect, useLocation, useMatches) are passed
Next Steps
Loaders
Track data loading performance
Actions
Monitor form submissions and mutations
Session Replay
Debug with session recordings
Prisma
Integrate database monitoring