Agent skill · software engineering · jeremylongshore
sentry-known-pitfalls
Identify and fix common Sentry SDK pitfalls that cause silent data loss,
Why this skill is useful
Adds executable scripts for identifying and fixing Sentry SDK pitfalls that aren't widely documented.
What it needs
Requires grep installed locally. Requires sentry account access. About 6k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Sentry Known Pitfalls Overview Ten production-grade Sentry SDK anti-patterns that silently break error tracking, inflate costs, or leave teams blind to failures. Each pitfall includes the broken pattern, root cause, and production-ready fix. For extended code samples and audit scripts, see configuration pitfalls, error capture pitfalls, SDK initialization pitfalls, integration pitfalls, and monitoring pitfalls. Prerequisites Active Sentry project with @sentry/node >= 8.x or @sentry/browser >= 8.x Access to the codebase containing Sentry.init() configuration Environment variable management (.env, secrets manager, or CI/CD vars) Instructions Step 1: Scan for Existing Pitfalls Step 2: Pitfall 1 — Hardcoding DSN in Source Code DSN in source ships in client bundles and cannot be rotated without a deploy. Attackers flood your project with garbage events. Step 3: Pitfall 2 — sampleRate: 1.0 in Production 100% sampling sends every trace. At 500K requests/day, overage is ~$371/month. Step 4: Pitfall 3 — Not Calling flush() in Serverless/CLI Sentry queues events in memory. Serverless/CLI processes exit before the queue drains — events never reach Sentry. Step 5: Pitfall 4 — beforeSend Returning null for All Events Missing return event causes JavaScript to return undefined, which Sentry treats as "drop." A single missing return kills all tracking. Step 6: Pitfall 5 — Release Version Mismatch (SDK vs Source Maps) SDK release must exactly match sentry-cli releases new. A v prefix mismatch means source maps never apply. Step 7: Pitfall 6 — Catching Errors Without Re-Throwing Capturing to Sentry but not re-throwing means the function returns undefined. Downstream code breaks silently. Step 8: Pitfall 7 — Missing environment Tag Without environment, dev errors pollute prod dashboards. Alert rules fire on local noise. Issue counts are inflated. Step 9: Pitfall 8 — Importing @sentry/node in Browser Bundle @sentry/node depends on Node.js built-ins (http, fs). …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/sentry-known-pitfalls