home / skills / jeremylongshore / claude-code-plugins-plus-skills / sentry-error-capture

This skill enables advanced error capture and context enrichment with Sentry to improve diagnostics, triage, and issue attribution.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill sentry-error-capture

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
1.2 KB
---
name: sentry-error-capture
description: |
  Execute advanced error capture and context enrichment with Sentry.
  Use when implementing detailed error tracking, adding context,
  or customizing error capture behavior.
  Trigger with phrases like "sentry error capture", "sentry context",
  "enrich sentry errors", "sentry exception handling".
allowed-tools: Read, Write, Edit, Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---

# Sentry Error Capture

## Prerequisites
- Sentry SDK installed and configured
- Understanding of error handling
- Application logging infrastructure


See `{baseDir}/references/implementation.md` for detailed implementation guide.

## Output
- Errors with full context in Sentry dashboard
- Filterable tags for issue management
- User attribution for error tracking

## Error Handling

See `{baseDir}/references/errors.md` for comprehensive error handling.

## Examples

See `{baseDir}/references/examples.md` for detailed examples.

## Resources
- [Sentry Enriching Events](https://docs.sentry.io/platforms/javascript/enriching-events/)
- [Sentry Scopes](https://docs.sentry.io/platforms/javascript/enriching-events/scopes/)

Overview

This skill enables advanced error capture and context enrichment with Sentry to deliver actionable, filterable issues in your Sentry dashboard. It helps attach rich runtime context, user attribution, and custom tags so teams can triage and resolve problems faster. Use it to standardize exception handling and to enhance observability across services.

How this skill works

The skill instruments your application to capture exceptions and breadcrumbs, enriches events with scoped context (user, tags, release, environment), and forwards fully formed events to Sentry. It supports custom event processors, additional metadata, and selective filtering so only relevant details are recorded. You configure SDK integrations, attach context at capture time, and optionally override default behavior for sensitive data or noise reduction.

When to use it

  • Implementing centralized error tracking across services or microservices
  • Adding user and request context to exceptions for faster debugging
  • Tagging errors to improve triage and automated routing
  • Customizing captured events to remove sensitive data or reduce noise
  • Correlating errors with releases, environments, or feature flags

Best practices

  • Attach minimal, meaningful context: user id, request id, and pertinent state to avoid data overload
  • Use tags for dimensions you filter on often (feature, service, env) rather than free-form fields
  • Sanitize PII before sending; prefer identifiers over raw personal data
  • Record breadcrumbs for important steps before an error to reproduce flows
  • Rate-limit or sample noisy error classes to focus on high-value issues

Example use cases

  • Capture uncaught exceptions in a web app and include current user and request metadata
  • Enrich background job errors with job parameters, retry counts, and queue name
  • Tag mobile crash reports by release version and device model for targeted rollouts
  • Filter out expected validation errors while keeping unexpected server faults
  • Add custom event processors to redact secrets and normalize stack frames

FAQ

Do I need the Sentry SDK installed?

Yes. The skill assumes the Sentry SDK is installed and configured for your platform so it can capture and send events.

How do I avoid sending sensitive data?

Sanitize or redact PII before adding it to events, use event processors to strip fields, and prefer identifiers over raw values.