error-tracking

Implements Sentry v8 error tracking and performance monitoring across Node.js services.

Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Boulea7/ohmyclaude --skill error-tracking-boulea7
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: error-tracking
Source: https://github.com/Boulea7/ohmyclaude/tree/main/src/ohmyclaude/templates/skills/error-tracking
Command: npx skills add https://github.com/Boulea7/ohmyclaude --skill error-tracking-boulea7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @sentry/node, @sentry/profiling-node.

What problem does it solve? Errors in Node.js services often go uncaptured or are logged only to the console, making production failures invisible and hard to diagnose. This Skill enforces consistent Sentry v8 error capture and performance monitoring patterns across controllers, routes, cron jobs, workflows, and database operations. ## Core Features & Use Cases - Standardized Error Capture: Provides copy-ready patterns for controllers (BaseController), Express routes, workflows (WorkflowSentryHelper), and cron jobs with mandatory instrument.ts imports. - Performance Monitoring: Instruments database queries with slow-query thresholds, N+1 detection, and Sentry spans for async operations and cron execution time. - Use Case: When adding a new cron job to an email service, follow the mandatory pattern that imports instrument.ts first, wraps execution in a Sentry span, and captures exceptions with cron-specific tags before exiting. ## Quick Start Add Sentry error tracking to my new Express route following the error-tracking skill patterns.

Frequently Asked Questions about error-tracking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Sentry error tracking to an Express route?▼

Import @sentry/node and wrap route logic in try/catch, calling Sentry.captureException with tags for the route and method plus extra context like the user ID. Return a 500 response after capturing so the error is both reported and handled.

How to monitor cron jobs with Sentry in Node.js?▼

Import instrument.ts as the first line after the shebang, then wrap the job in Sentry.startSpan with op 'cron' and a job name attribute. Capture exceptions with cron.job tags and exit with a non-zero code on failure.

Does Sentry v8 support database query performance monitoring?▼

Yes, wrap database calls in a performance tracking helper that records query duration, flags queries slower than 100ms, and detects N+1 patterns. Enable tracing in config with tracesSampleRate and slowQueryThreshold settings.

Why must instrument.ts be imported first in cron scripts?▼

Sentry must initialize before any other application code runs so it can patch modules and capture all errors and spans. Importing it later means early errors and auto-instrumentation are missed.

What context should I attach to Sentry errors?▼

Use Sentry.withScope to set the user ID, service tag, and environment tag, plus an operation context with details like workflow code and entity ID. Never include sensitive data in error messages or context.