Agent skill · software engineering · jeremylongshore
sentry-sdk-patterns
Best practices for using Sentry SDK in TypeScript and Python.
Why this skill is useful
Provides specific implementation patterns and best practices for using Sentry SDK in TypeScript and Python that the AI wouldn't reliably generate on its own.
What it needs
Requires @sentry/node, sentry-sdk installed locally. About 5k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Sentry SDK Patterns Overview Production patterns for @sentry/node (v8+) and sentry-sdk (Python 2.x+) covering scoped error context, breadcrumb strategies, event filtering with beforeSend, custom fingerprinting for issue grouping, and performance instrumentation with spans. All examples use real Sentry SDK APIs. Prerequisites Sentry SDK v8+ installed (@sentry/node, @sentry/react, or sentry-sdk) SENTRYDSN environment variable configured Familiarity with async/await (TypeScript) or context managers (Python) Instructions Step 1 -- Structured Error Context with Scopes Use Sentry.withScope() (TypeScript) or sentrysdk.newscope() (Python) to attach context to individual events without leaking state across requests. TypeScript -- Scoped error capture: Python -- Scoped error capture: Key rule: Never call Sentry.setTag() or sentrysdk.settag() at the module level inside request handlers. Those mutate the global scope and leak between concurrent requests. Always use withScope() or newscope(). Step 2 -- Breadcrumbs, Filtering, and Fingerprints Structured breadcrumb helpers Python breadcrumbs: beforeSend -- Drop noise, scrub PII Python beforeSend: beforeBreadcrumb -- Filter noisy breadcrumbs Custom fingerprints for issue grouping Override default stack-trace grouping when the same root cause produces different stacks: Step 3 -- Framework Integration and Performance Spans Express middleware (Sentry v8) React Error Boundary Performance spans (TypeScript) Performance spans (Python) Async batch processing with error isolation See implementation.md for Django middleware, test mocking patterns, and additional framework examples. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/sentry-sdk-patterns--3f6b74