devops-sentry-error-tracking
Provides instructions and code patterns for integrating Sentry into applications to track errors and performance.
Install
mkdir -p .claude/skills/devops-sentry-error-tracking && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15381" && unzip -o skill.zip -d .claude/skills/devops-sentry-error-tracking && rm skill.zipInstalls to .claude/skills/devops-sentry-error-tracking
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Imported TRAE skill from devops/Sentry_Error_Tracking.mdKey capabilities
- →Install Sentry SDK for various platforms
- →Initialize Sentry early in the application lifecycle
- →Capture errors manually
- →Integrate Sentry with Express for automatic request tracking
- →Protect PII using `beforeSend` or data scrubbing
- →Upload source maps for original code stack traces
How it works
The skill guides through installing and initializing the Sentry SDK, configuring error handlers for automatic request tracking, and providing examples for manual exception reporting.
Inputs & outputs
When to use devops-sentry-error-tracking
- →Initialize Sentry SDK for error tracking
- →Setup error and performance monitoring
- →Capture manual exceptions
- →Integrate Sentry with Express middleware
About this skill
Skill: Sentry Error Tracking Setup
Purpose
To track application errors.
When to Use
- SDK setup and source maps.
- When the specific requirement for Sentry Error Tracking Setup arises in the project.
Procedure
1. SDK Installation
Install the Sentry SDK for your platform.
# For Node.js
npm install @sentry/node @sentry/profiling-node
2. Initialization
Initialize Sentry as early as possible in your application.
import * as Sentry from "@sentry/node";
import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "https://[email protected]/project-id",
integrations: [
nodeProfilingIntegration(),
],
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of transactions in dev
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: 1.0,
});
3. Capturing Errors
Sentry automatically captures unhandled exceptions, but you can also capture errors manually.
try {
doSomethingRisky();
} catch (e) {
Sentry.captureException(e, {
extra: { context: "risky_operation" },
tags: { feature: "billing" }
});
}
4. Integrating with Express
Add Sentry handlers to your Express app for automatic request tracking.
const app = express();
// The request handler must be the first middleware on the app
app.use(Sentry.Handlers.requestHandler());
// ... your routes ...
// The error handler must be before any other error middleware and after all controllers
app.use(Sentry.Handlers.errorHandler());
Constraints
- PII Protection: Use
beforeSendor Sentry's data scrubbing features to remove sensitive user data (passwords, tokens) from reports. - Source Maps: Upload source maps to Sentry during your build process to see original code in stack traces instead of minified code.
- Sampling: In high-traffic production environments, lower the
tracesSampleRate(e.g., 0.1 or 0.01) to avoid performance impact and cost.
Expected Output
Real-time error notifications with full stack traces, breadcrumbs (user actions leading to the error), and environment details in the Sentry dashboard.
When not to use it
- →When not needing to track application errors
- →When not using Sentry for error tracking
- →When not needing performance monitoring
Limitations
- →PII Protection: Use `beforeSend` or Sentry's data scrubbing features
- →Source Maps: Upload source maps to Sentry during your build process
- →Sampling: In high-traffic production environments, lower the `tracesSampleRate`
How it compares
This skill provides a structured setup and integration guide for Sentry error tracking, including PII protection and source map considerations, which is more complete than basic SDK installation instructions.
Compared to similar skills
devops-sentry-error-tracking side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| devops-sentry-error-tracking (this skill) | 0 | 3mo | Review | Beginner |
| optimizing-performance | 1 | 2mo | Review | Intermediate |
| error-tracking | 1 | 9mo | Caution | Intermediate |
| fireflies-debug-bundle | 1 | 1mo | Caution | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
optimizing-performance
CloudAI-X
Analyzes and optimizes application performance across frontend, backend, and database layers. Use when diagnosing slowness, improving load times, optimizing queries, reducing bundle size, or when asked about performance issues.
error-tracking
diet103
Add Sentry v8 error tracking and performance monitoring to your project services. Use this skill when adding error handling, creating new controllers, instrumenting cron jobs, or tracking database performance. ALL ERRORS MUST BE CAPTURED TO SENTRY - no exceptions.
fireflies-debug-bundle
jeremylongshore
Collect Fireflies.ai debug evidence for support tickets and troubleshooting. Use when encountering persistent issues, preparing support tickets, or collecting diagnostic information for Fireflies.ai problems. Trigger with phrases like "fireflies debug", "fireflies support bundle", "collect fireflies logs", "fireflies diagnostic".
sentry-debug-bundle
jeremylongshore
Execute collect debug information for Sentry support tickets. Use when preparing support requests, debugging complex issues, or gathering diagnostic information. Trigger with phrases like "sentry debug info", "sentry support ticket", "gather sentry diagnostics", "sentry debug bundle".
maintainx-debug-bundle
jeremylongshore
Comprehensive debugging toolkit for MaintainX integrations. Use when experiencing complex issues, need detailed logging, or troubleshooting integration problems with MaintainX. Trigger with phrases like "debug maintainx", "maintainx troubleshoot", "maintainx detailed logs", "diagnose maintainx", "maintainx issue".
sentry-error-capture
jeremylongshore
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".