Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/sentry-reliability-patterns

@0d57af8
Run it yourself

Build reliable Sentry integrations with graceful degradation, circuit breakers, and offline queuing. Use when implementing fault-tolerant error tracking, handling SDK initialization failures, building retry logic for Sentry transports, or ensuring apps survive Sentry outages. Trigger with "sentry reliability", "sentry circuit breaker", "sentry offline queue", "sentry graceful degradation", "sentry failover", or "resilient sentry setup".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/sentry-reliability-patterns

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referenceserrors.md

≈526 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Error Handling Reference

Common Errors and Solutions

Error Cause Solution
App crashes on Sentry.init() Invalid DSN, network error, or SDK bug Wrap in try/catch via initSentrySafe(); set sentryAvailable = false
Events lost on SIGTERM / deploy No Sentry.close() before process.exit() Register SIGTERM/SIGINT handlers calling Sentry.close(2000)
Sentry outage cascades latency Every error path blocks on HTTP to Sentry Circuit breaker trips after 5 failures, skips sends for 60s
Events lost during network blip SDK silently drops events with no retry Use makeRetryTransport with exponential backoff + offline queue
Silent event loss, no alerts Sentry SDK fails without throwing Health check endpoint probes with captureMessage + flush
Queue file grows unbounded Never drained or Sentry permanently down Cap at MAX_QUEUED_EVENTS (1000); call drainQueue() on startup
beforeSend hook crashes pipeline User-supplied callback throws Wrap in nested try/catch, return raw event on failure
Corrupt offline queue file Partial write or disk error Parse in try/catch, delete corrupt file, log warning
Client not created after init DSN is empty string or malformed Check Sentry.getClient() after init; log warning if null
Events queued but never replayed drainQueue() only called at startup Add periodic drain via setInterval or cron

Diagnostic Checklist

  1. Check initialization: Call Sentry.getClient() — if null, DSN is invalid or init was skipped
  2. Check circuit state: Call sentryBreaker.getStatus() — if open, Sentry was unreachable
  3. Check offline queue: Look for queue file at SENTRY_QUEUE_PATH — if present, events are buffered
  4. Check flush result: Sentry.flush(timeout) returns false if timeout expired before all events sent
  5. Check SDK transport: Network errors appear in custom transport catch blocks

Tons of Skills by Intent Solutions

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill provides production-ready code patterns for building resilient Sentry integrations with features like circuit breakers and offline queuing. No security issues were detected.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
What it can do
Reads files Edits files Runs commands
version
1.51.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
compatibility
Designed for Claude Code
All 7 allowed tools
ReadWriteEditGrepBash(node:*)Bash(pip:*)Bash(python*:*)
Other metadata
tags
[
  "saas",
  "sentry",
  "reliability",
  "resilience",
  "circuit-breaker",
  "offline-queue",
  "graceful-degradation"
]

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/sentry-reliability-patterns