Skip to content
Back to skills

Sentry Monitoring

ASecurity

Sentry SDK setup, error capture with context, tracing, source maps, session replay and releases. Use when adding Sentry to a project, configuring tracing or source maps, or debugging a production error in Sentry.

  • 80 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 3, 2026
ai-agentsnextjsnodeexpressdebugging

Works with

  • cli

Security analysis

A100/100

Scanned October 5, 2026

npx -y skills add monkilabs/opencastle --skill sentry-monitoring --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sentry Monitoring?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sentry Monitoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monkilabs-sentry-monitoring/badge)](https://www.skillsdirectory.com/skills/monkilabs-sentry-monitoring)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: sentry-monitoring
description: "Sentry SDK setup, error capture with context, tracing, source maps, session replay and releases. Use when adding Sentry to a project, configuring tracing or source maps, or debugging a production error in Sentry."
---

# Sentry Monitoring

## Next.js

- Three separate init files, and the browser one is `instrumentation-client.ts` — not `sentry.client.config.ts` — alongside `sentry.server.config.ts` and `sentry.edge.config.ts`. `npx @sentry/wizard@latest -i nextjs` creates all three and patches `next.config.ts`.
- Source maps upload only when `next.config.ts` is wrapped in `withSentryConfig()` and `SENTRY_AUTH_TOKEN` (plus `SENTRY_ORG` / `SENTRY_PROJECT`) is present at build time, CI included.
- `tunnelRoute: '/monitoring'` proxies events through your own origin so ad-blockers stop dropping them.
- `app/global-error.tsx` reports nothing by itself — call `Sentry.captureException(error)` inside it. Wrap server actions in `Sentry.withServerActionInstrumentation('name', fn)`.

## Node / Express

`import './instrument'` must come before every other import in the process. `app.use(Sentry.expressErrorHandler())` must be the last error-handling middleware.

## Sampling and context

- `tracesSampleRate`: 1.0 dev, 0.2–0.5 low-traffic production, 0.05–0.1 high-traffic. Use `tracesSampler` returning 0 for `/health` and polling routes, ~0.5 for checkout/auth.
- `Sentry.setUser` / `setTag` / `setContext` persist for the rest of the session; `Sentry.withScope` is one-off. Re-throw after `captureException` when the caller still needs the error.
- Override issue grouping with `event.fingerprint = [...]` in `beforeSend`.
- Core Web Vitals are captured with no config. Alert thresholds: LCP > 2.5s, CLS > 0.1, INP > 200ms.
- The DSN is safe to expose client-side. `sendDefaultPii: true` captures IP, user agent, and authenticated user.

Docs: https://docs.sentry.io/

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.