sentry-sdk-patterns
使用TypeScript和Python中Sentry SDK的最佳实践。用于实现错误处理模式、结构化Sentry代码或优化SDK使用。通过短语如'sentry最佳实践'、'sentry模式'、'sentry sdk使用'、'sentry代码结构'触发。
📖 中文导读:使用TypeScript和Python中Sentry SDK的最佳实践。用于实现错误处理模式、结构化Sentry代码或优化SDK使用。通过短语如'sentry最佳实践'、'sentry模式'、'sentry sdk使用'、'sentry代码结构'触发。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: sentry-sdk-patterns description: | Execute best practices for using Sentry SDK in TypeScript and Python. Use when implementing error handling patterns, structuring Sentry code, or optimizing SDK usage. Trigger with phrases like "sentry best practices", "sentry patterns", "sentry sdk usage", "sentry code structure". allowed-tools: Read, Write, Edit, Grep version: 1.0.0 license: MIT author: Jeremy Longshore jeremy@intentsolutions.io
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.