
Error Tracking
- 412 installs
- 305 repo stars
- Updated March 4, 2026
- aj-geddes/useful-ai-prompts
error-tracking is an agent skill that implements Sentry exception monitoring with release tracking, source maps, and performance sampling for developers who need production error visibility in Node.js or Python apps.
About
error-tracking in aj-geddes/useful-ai-prompts guides Sentry integration for automatic exception capture, release tracking, and performance issue detection in production applications. The skill includes a quick start with @sentry/cli, @sentry/node, and sentry init, plus six reference guides: Sentry setup, Express middleware integration, Python integration, source maps and release management, custom error context, and performance monitoring. Best practices cover sample rate tuning, breadcrumb usage, user context, sensitive data filtering, and CI/CD release creation while warning against 100% error sampling and PII in context. Reference markdown files in references/ provide stack-specific implementation steps agents can follow sequentially during production rollout. Developers reach for error-tracking when launching services without observability, debugging production stability, or correlating exceptions with deploy versions. Triggers include Sentry setup, production bug tracking, and application stability analysis for Node.js and Python backends.
- SDK integration patterns
- Release and environment tagging
- Alerting and noise reduction
- Source map and context enrichment
- Incident triage workflows
Error Tracking by the numbers
- 412 all-time installs (skills.sh)
- Ranked #105 of 596 Debugging skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill error-trackingAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 412 |
|---|---|
| repo stars | ★ 305 |
| Last updated | March 4, 2026 |
| Repository | aj-geddes/useful-ai-prompts ↗ |
How do you set up Sentry error tracking in production?
Integrate and tune error tracking (e.g., Sentry, Rollbar) to capture exceptions, stack traces, releases, and alerting for live applications.
Who is it for?
Backend developers shipping Node.js or Python services who need structured Sentry rollout with releases and source maps before production traffic.
Skip if: Teams standardized on a different APM stack who only need log aggregation without exception capture tooling.
When should I use this skill?
User asks to set up Sentry, error monitoring, production exception tracking, release tracking, or application stability analysis.
What you get
Sentry SDK configuration, source map uploads, release tags, custom error context, and performance monitoring dashboards.
- Sentry SDK config
- Source map upload pipeline
- Release tracking setup
By the numbers
- Includes 6 reference guides in the references/ directory
- Quick start uses @sentry/cli, @sentry/node, and sentry init
Files
Error Tracking
Table of Contents
Overview
Set up comprehensive error tracking with Sentry to automatically capture, report, and analyze exceptions, performance issues, and application stability.
When to Use
- Production error monitoring
- Automatic exception capture
- Release tracking
- Performance issue detection
- User impact analysis
Quick Start
Minimal working example:
npm install -g @sentry/cli
npm install @sentry/node @sentry/tracing
sentry init -dReference Guides
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Sentry Setup | Sentry Setup, Node.js Sentry Integration |
| Express Middleware Integration | Express Middleware Integration |
| Python Sentry Integration | Python Sentry Integration |
| Source Maps and Release Management | Source Maps and Release Management, CI/CD Release Creation |
| Custom Error Context | Custom Error Context |
| Performance Monitoring | Performance Monitoring |
Best Practices
✅ DO
- Set up source maps for production
- Configure appropriate sample rates
- Track releases and deployments
- Filter sensitive information
- Add meaningful context to errors
- Use breadcrumbs for debugging
- Set user information
- Review error patterns regularly
❌ DON'T
- Send 100% of errors in production
- Include passwords in context
- Ignore configuration for environment
- Skip source map uploads
- Log personally identifiable information
- Use without proper filtering
- Disable tracking in production
Custom Error Context
Custom Error Context
// custom-error-context.js
const Sentry = require("@sentry/node");
Sentry.configureScope((scope) => {
scope.setUser({
id: userId,
email: userEmail,
subscription: "pro",
});
scope.setTag("feature_flag", "new-ui");
scope.setTag("database", "postgres-v12");
scope.setContext("character", {
name: "Mighty Fighter",
level: 19,
});
scope.addBreadcrumb({
category: "ui.click",
message: "User clicked signup button",
level: "info",
});
scope.addBreadcrumb({
category: "database",
message: "Query executed",
level: "debug",
data: {
query: "SELECT * FROM users",
duration: 125,
},
});
});
// Before sending
Sentry.init({
dsn: process.env.SENTRY_DSN,
beforeSend(event, hint) {
if (event.request) {
delete event.request.cookies;
delete event.request.headers["authorization"];
}
return event;
},
});Express Middleware Integration
Express Middleware Integration
// app.js
const express = require("express");
const Sentry = require("./sentry");
const app = express();
app.use(Sentry.Handlers.requestHandler());
app.use(Sentry.Handlers.tracingHandler());
app.get("/api/users/:id", (req, res) => {
const transaction = Sentry.startTransaction({
name: "get_user",
op: "http.server",
});
try {
const userId = req.params.id;
Sentry.captureMessage("Fetching user", {
level: "info",
tags: { userId: userId },
});
const user = db.query(`SELECT * FROM users WHERE id = ${userId}`);
if (!user) {
Sentry.captureException(new Error("User not found"), {
level: "warning",
contexts: { request: { userId } },
});
return res.status(404).json({ error: "User not found" });
}
transaction.setTag("user.id", user.id);
res.json(user);
} catch (error) {
Sentry.captureException(error, {
level: "error",
tags: { endpoint: "get_user", userId: req.params.id },
});
res.status(500).json({ error: "Internal server error" });
} finally {
transaction.finish();
}
});
app.use(Sentry.Handlers.errorHandler());
app.listen(3000);Performance Monitoring
Performance Monitoring
// performance.js
const Sentry = require("@sentry/node");
const transaction = Sentry.startTransaction({
name: "process_order",
op: "task",
data: { orderId: "12345" },
});
const dbSpan = transaction.startChild({
op: "db",
description: "Save order to database",
});
saveOrderToDb(order);
dbSpan.finish();
const paymentSpan = transaction.startChild({
op: "http.client",
description: "Process payment",
});
processPayment(order);
paymentSpan.finish();
transaction.setStatus("ok");
transaction.finish();Python Sentry Integration
Python Sentry Integration
# sentry_config.py
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
from sentry_sdk.integrations.logging import LoggingIntegration
import logging
import os
sentry_logging = LoggingIntegration(
level=logging.INFO,
event_level=logging.ERROR
)
sentry_sdk.init(
dsn=os.environ.get('SENTRY_DSN'),
integrations=[FlaskIntegration(), sentry_logging],
environment=os.environ.get('ENVIRONMENT', 'development'),
release=os.environ.get('APP_VERSION', '1.0.0'),
traces_sample_rate=0.1 if os.environ.get('ENVIRONMENT') == 'production' else 1.0,
attach_stacktrace=True
)
# Flask integration
from flask import Flask
import sentry_sdk
app = Flask(__name__)
@app.route('/api/orders/<order_id>')
def get_order(order_id):
try:
sentry_sdk.set_user({'id': request.user.id})
sentry_sdk.capture_message(f'Fetching order {order_id}', level='info')
order = db.query(f'SELECT * FROM orders WHERE id = {order_id}')
if not order:
sentry_sdk.capture_exception(ValueError('Order not found'))
return {'error': 'Order not found'}, 404
return {'order': order}
except Exception as e:
sentry_sdk.capture_exception(e, {
'tags': { 'endpoint': 'get_order', 'order_id': order_id }
})
return {'error': 'Internal server error'}, 500Sentry Setup
Sentry Setup
npm install -g @sentry/cli
npm install @sentry/node @sentry/tracing
sentry init -dNode.js Sentry Integration
// sentry.js
const Sentry = require("@sentry/node");
const Tracing = require("@sentry/tracing");
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV || "development",
tracesSampleRate: process.env.NODE_ENV === "production" ? 0.1 : 1.0,
release: process.env.APP_VERSION || "1.0.0",
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Tracing.Integrations.Express({
app: true,
request: true,
transaction: true,
}),
],
ignoreErrors: ["Network request failed", "TimeoutError"],
});
module.exports = Sentry;Source Maps and Release Management
Source Maps and Release Management
// webpack.config.js
const SentryCliPlugin = require("@sentry/webpack-plugin");
module.exports = {
plugins: [
new SentryCliPlugin({
include: "./dist",
urlPrefix: "https://example.com/",
release: process.env.APP_VERSION || "1.0.0",
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
],
};CI/CD Release Creation
#!/bin/bash
VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g')
# Create release
sentry-cli releases -o my-org -p my-project create $VERSION
# Upload source maps
sentry-cli releases -o my-org -p my-project files $VERSION upload-sourcemaps ./dist
# Finalize release
sentry-cli releases -o my-org -p my-project finalize $VERSION
# Deploy
sentry-cli releases -o my-org -p my-project deploys $VERSION new -e production#!/bin/bash
# validate-api.sh - Validate API specification
# Usage: ./validate-api.sh <openapi_spec>
set -euo pipefail
SPEC_FILE="${{1:?Usage: $0 <openapi_spec>}}"
echo "Validating API spec: $SPEC_FILE"
# TODO: Add API validation
# - Validate OpenAPI/Swagger syntax
# - Check endpoint naming conventions
# - Verify response schemas
# - Check for required headers
# - Validate authentication definitions
echo "API validation complete."
# API Endpoint Scaffold
# TODO: Customize for your API framework
openapi: "3.0.3"
info:
title: "API Service"
version: "1.0.0"
paths:
/api/v1/resource:
get:
summary: "List resources"
# TODO: Define parameters and responses
responses:
"200":
description: "Success"
post:
summary: "Create resource"
# TODO: Define request body and responses
responses:
"201":
description: "Created"
Related skills
How it compares
Pick error-tracking for Sentry-first exception and release workflows; pick infrastructure-monitoring skills when the gap is host metrics rather than application exceptions.
FAQ
What stacks does error-tracking cover?
error-tracking includes reference guides for Node.js Sentry setup, Express middleware integration, Python Sentry integration, source maps, custom error context, and performance monitoring.
What Sentry practices does error-tracking recommend?
error-tracking advises configuring sample rates, uploading source maps, tracking releases in CI/CD, filtering sensitive data, and using breadcrumbs while avoiding 100% production error capture.