Sentry Sdk Patterns
Prerequisites
- Sentry SDK installed and configured
- Understanding of error handling concepts
- Familiarity with async/await patterns
Instructions
- Create a centralized error handler module for consistent error capture
- Implement scoped context for transactions and operations
- Add structured breadcrumbs for debugging context
- Configure error boundaries in frameworks (React, Vue, etc.)
- Use custom fingerprinting for better issue grouping
- Implement async error handling with proper scope propagation
- Add performance tracing for critical paths
- Configure sampling rates based on traffic volume
See {baseDir}/references/implementation.md for detailed implementation guide.
Output
- Clean, maintainable error handling code
- Consistent error context across application
- Efficient Sentry SDK usage
Error Handling
See {baseDir}/references/errors.md for comprehensive error handling.
Examples
See {baseDir}/references/examples.md for detailed examples.
微信扫一扫