A full-stack application that demonstrates Sentry's distributed tracing capabilities between frontend and backend services.
- Node.js (v18+ recommended)
- npm or yarn
- A Sentry account with a DSN
- Supabase account and credentials
Create a .env
file in the root directory:
VITE_SENTRY_DSN=your_sentry_dsn_here
VITE_SUPABASE_URL=your_supabase_url_here
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here
Create a .env
file in the backend
directory:
SENTRY_DSN=your_sentry_dsn_here
PORT=3000
SUPABASE_URL=your_supabase_url_here
SUPABASE_ANON_KEY=your_supabase_anon_key_here
# Install frontend dependencies
npm install
# Install backend dependencies
npm install --prefix backend
npm run backend
# or
./start-backend.sh
npm run dev
# or
./start-frontend.sh
./start-app.sh
This demo implements Sentry with:
- Distributed Tracing: Connects frontend and backend traces with proper context propagation
- Performance Monitoring: Tracks API calls and database operations through spans
- Error Tracking: Captures and reports errors across the stack
- Profiling: Measures performance metrics
- Slow API: Tests tracing on deliberately slow endpoints
- Error Demo: Demonstrates error tracking and reporting
- DB Query: Shows database spans and performance monitoring
- Batch Requests: Demonstrates trace propagation across multiple requests
- Server/Client Components: Shows different rendering strategies
- React application with Sentry integration
- Uses
@sentry/react
for browser monitoring - Implements trace context propagation in API requests
- Express server with Sentry integration
- Uses
@sentry/node
for server monitoring - Implements spans for operation monitoring
- Demonstrates auto-instrumentation and custom spans
- Auto-Instrumentation: Automatic tracing for React and Express
- Custom Spans: Creating spans for detailed performance tracking
- Error Reporting: Integration with error boundaries
- Custom Context: Adding custom attributes to spans
- Distributed Tracing: Connecting frontend and backend traces through context propagation
- Profiling: Performance profiling integrated with traces
-
Frontend:
- React
- Vite
- TypeScript
- Tailwind CSS
- Sentry React SDK
-
Backend:
- Node.js
- Express
- TypeScript
- Supabase
- Sentry Node SDK
- Sentry Profiling