sentry-error-capture

Featured

Implement advanced error capture and context enrichment with Sentry. Use when adding captureException/captureMessage calls, enriching errors with user context, tags, breadcrumbs, or custom fingerprinting. Trigger with "sentry error capture", "sentry context", "enrich sentry errors", "sentry exception handling", "sentry breadcrumbs", "sentry fingerprint".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Sentry Error Capture ## Overview Capture errors and enrich them with structured context so your team can diagnose production issues in seconds instead of hours. Covers `captureException`, `captureMessage`, scoped context (`withScope` / `push_scope`), breadcrumbs, custom fingerprinting, and `beforeSend` filtering using `@sentry/node` v8 and `sentry-sdk` v2 APIs. ## Prerequisites - Sentry SDK installed and initialized (`@sentry/node` v8+ or `sentry-sdk` v2+) - A valid DSN configured via environment variable (`SENTRY_DSN`) - Understanding of try/catch (JS) or try/except (Python) error handling - A Sentry project created at [sentry.io](https://sentry.io) ## Instructions ### Step 1 -- Capture Exceptions with Full Stack Traces Always pass real `Error` objects (or Python exception instances), never plain strings. Plain strings lose the stack trace, making debugging far harder. **TypeScript (`@sentry/node`)** ```typescript import * as Sentry from '@sentry/node'; // CORRECT -- full stack trace preserved try { await riskyOperation(); } catch (error) { Sentry.captureException(error); } // WRONG -- no stack trace, hard to debug Sentry.captureException('something went wrong'); // Wrapping non-Error values into proper Error objects Sentry.captureException(new Error(`API returned ${statusCode}: ${body}`)); // Capture with inline context (no scope needed for simple cases) Sentry.captureException(error, { tags: { transaction: 'purchase' }, extra: { orderId, amount }, })...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category