Error Tracking with Sentry

Integrates Sentry v8 error tracking and performance monitoring across project services, ensuring all errors are captured with proper context, severity levels, and workflow instrumentation.

Error Tracking with Sentry

Standardized patterns for integrating Sentry v8 error tracking and performance monitoring across all project services, with mandatory error reporting, proper context capture, severity classification, and workflow instrumentation.

Essential for production applications requiring comprehensive error tracking and performance monitoring with Sentry.

Core Purpose

This skill provides complete Sentry integration patterns for:

  • Error Capture: Comprehensive error tracking across services
  • Context Enrichment: Capture relevant error context and metadata
  • Severity Levels: Proper error classification and prioritization
  • Performance Monitoring: Track application performance metrics
  • Workflow Instrumentation: Monitor critical business flows
  • Production Reliability: Ensure no errors go unnoticed

Key Features

Sentry Integration Patterns

Error Handling:

  • Controller error capture
  • Route-level error tracking
  • Database operation errors
  • Cron job error monitoring

Context & Metadata:

  • User information capture
  • Request context enrichment
  • Custom tags and fingerprints
  • Breadcrumb tracking

Performance Monitoring:

  • Transaction tracing
  • Span instrumentation
  • Performance metrics
  • Slow query detection

Quality Enforcement:

  • Mandatory error reporting
  • Severity classification
  • Error grouping strategies
  • Alert configuration

Use Cases

Perfect for:

  • Production Apps: Comprehensive error monitoring
  • Microservices: Distributed error tracking
  • Performance Tuning: Identify bottlenecks
  • Debugging: Root cause analysis
  • SLA Monitoring: Track reliability metrics

Getting Started

  1. Install Sentry: Set up Sentry v8 in your project
  2. Configure Integration: Apply standard patterns
  3. Add Error Capture: Implement in controllers/routes
  4. Set Up Performance: Enable transaction tracking
  5. Test & Verify: Ensure errors are captured

Technology Stack

  • Sentry v8 SDK
  • Node.js integration
  • Express.js middleware
  • Prisma error tracking
  • Performance monitoring

Integration Points

  • Controllers and routes
  • Database operations
  • Cron jobs and workers
  • Critical workflows
  • API endpoints

Credits

Created by diet103 as part of the Claude Code Infrastructure Showcase, refined through 6 months of production error tracking in complex microservices environments.

Battle-tested Sentry patterns ensuring zero errors go unnoticed, shared after the popular "Claude Code is a Beast – Tips from 6 Months of Hardcore Use" Reddit post.