Agent skill · software engineering · jeremylongshore

sentry-reliability-patterns

Build reliable Sentry integrations with graceful degradation, circuit

Why this skill is useful

Adds specific implementation patterns for Sentry integrations that enhance fault tolerance and reliability, which the AI wouldn't generate on its own.

What it needs

Requires @sentry/node, sentry-sdk installed locally. Requires sentry account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Sentry Reliability Patterns Overview Build Sentry integrations that never take your application down via three pillars: safe initialization with graceful degradation, a circuit breaker that stops hammering Sentry when unreachable, and an offline event queue that buffers errors during outages. Every pattern prioritizes application uptime over telemetry completeness. Prerequisites @sentry/node v8+ (TypeScript) or sentry-sdk v2+ (Python) A valid Sentry DSN from project settings at sentry.io A fallback logging destination decided (console, file, or external logger) Understanding of your application shutdown lifecycle (signal handlers, container orchestration) Instructions Step 1 — Safe Initialization with Graceful Degradation Wrap Sentry.init() in try/catch so an invalid DSN, network error, or SDK bug never crashes the app. Track initialization state with a boolean flag. Protect beforeSend callbacks with their own error boundary. Create lib/sentry-safe.ts with initSentrySafe() and captureError(). See graceful-degradation.md for full implementation. Key rules: Never let Sentry.init() crash the process — wrap in try/catch, set sentryAvailable = false on failure Verify client creation with Sentry.getClient() — invalid DSNs silently produce no client Always log errors locally as baseline before attempting Sentry capture Wrap user-supplied beforeSend hooks in nested try/catch — return raw event on hook failure Step 2 — Circuit Breaker for Sentry Outages When Sentry is unreachable, continued attempts waste resources and add latency. Track consecutive failures and trip open after a threshold. After cooldown, enter half-open state and send a single probe. Implement SentryCircuitBreaker class with closed/open/half-open states. See circuit-breaker-pattern.md for full implementation. Expose state via health-checks.md endpoint. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/sentry-reliability-patterns

View the source on GitHub

Browse the @skills marketplace