返回 Skill 列表
extension
分类: 开发与工程无需 API Key

sentry-sdk-patterns

执行在TypeScript和Python中使用Sentry SDK的最佳实践。在实现错误处理模式、构建Sentry代码或优化SDK使用时采用。可以通过诸如“sentry最佳实践”、“sentry模式”、“sentry sdk使用”、“sentry代码结构”等短语触发。

person作者: jakexiaohubgithub

Sentry Sdk Patterns

Prerequisites

  • Sentry SDK installed and configured
  • Understanding of error handling concepts
  • Familiarity with async/await patterns

Instructions

  1. Create a centralized error handler module for consistent error capture
  2. Implement scoped context for transactions and operations
  3. Add structured breadcrumbs for debugging context
  4. Configure error boundaries in frameworks (React, Vue, etc.)
  5. Use custom fingerprinting for better issue grouping
  6. Implement async error handling with proper scope propagation
  7. Add performance tracing for critical paths
  8. 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.

Resources