sentry-reliability-patterns
Build reliable Sentry integrations.Use when handling SDK failures gracefully,implementing retry logic, or ensuring error tracking uptime.Trigger with phrases like "sentry reliability", "sentry failover","sentry sdk failure handling", "resilient sentry setup".
When & Why to Use This Skill
The Sentry Reliability Patterns skill is designed to help developers and SREs build highly resilient error-tracking integrations. It provides actionable patterns for handling Sentry SDK failures gracefully, ensuring that monitoring infrastructure never becomes a single point of failure for the application. By implementing circuit breakers, exponential backoff retries, and offline queuing, this skill ensures consistent observability and application stability even during network instability or third-party service outages.
Use Cases
- 1. Resilient Error Tracking: Implement graceful degradation and try/catch wrappers around Sentry initialization to prevent SDK failures from crashing the main application.
- 2. Network Fault Tolerance: Configure exponential backoff retries and offline event queues to ensure critical error data is captured and delivered once connectivity is restored.
- 3. High-Availability Monitoring: Deploy dual-write patterns to multiple error trackers and implement circuit breakers to automatically skip Sentry calls during repeated failures, protecting application performance.
- 4. Production Readiness & Shutdown: Set up health check endpoints for monitoring connectivity and implement graceful shutdown procedures using Sentry.close() to ensure no telemetry data is lost during deployments.
| name | sentry-reliability-patterns |
|---|---|
| description | | |
| allowed-tools | Read, Write, Edit, Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
Sentry Reliability Patterns
Prerequisites
- Understanding of failure modes
- Fallback logging strategy
- Network reliability characteristics
- Graceful shutdown requirements
Instructions
- Wrap Sentry.init with try/catch for graceful initialization failure handling
- Implement fallback capture function that logs locally if Sentry fails
- Add retry with exponential backoff for network failures
- Implement offline event queue for intermittent connectivity
- Add circuit breaker pattern to skip Sentry after repeated failures
- Configure request timeout with wrapper function
- Implement graceful shutdown with Sentry.close() on SIGTERM
- Set up dual-write pattern to multiple error trackers for redundancy
- Create health check endpoint to verify Sentry connectivity
- Test all failure scenarios to ensure application continues operating
Output
- Graceful degradation implemented
- Circuit breaker pattern applied
- Offline queue configured
- Dual-write reliability enabled
Error Handling
See {baseDir}/references/errors.md for comprehensive error handling.
Examples
See {baseDir}/references/examples.md for detailed examples.