Logging Observability
getsentry/toolkit
Review code for correct logging and error handling patterns.
Enforces that every error in a service is captured to Sentry v8, with patterns for controllers, routes, cron jobs and database performance spans instead of console logging alone.
$ npx skills add diet103/claude-code-infrastructure-showcase --skill error-tracking -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install diet103/claude-code-infrastructure-showcase error-tracking --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/diet103/claude-code-infrastructure-showcase.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/error-tracking .claude/skills/error-tracking && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "error-tracking" agent skill from https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.agents/skills/error-tracking into .claude/skills/error-tracking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-tracking", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.agents/skills/error-trackingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add diet103/claude-code-infrastructure-showcase --skill error-tracking -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install diet103/claude-code-infrastructure-showcase error-tracking --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/diet103/claude-code-infrastructure-showcase.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/error-tracking .agents/skills/error-tracking && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "error-tracking" agent skill from https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.agents/skills/error-tracking into .agents/skills/error-tracking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-tracking", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add diet103/claude-code-infrastructure-showcase --skill error-tracking -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install diet103/claude-code-infrastructure-showcase error-tracking --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/diet103/claude-code-infrastructure-showcase.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/error-tracking .cursor/skills/error-tracking && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "error-tracking" agent skill from https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.agents/skills/error-tracking into .cursor/skills/error-tracking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-tracking", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/diet103/claude-code-infrastructure-showcase.git --path .agents/skills/error-tracking--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add diet103/claude-code-infrastructure-showcase --skill error-tracking -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install diet103/claude-code-infrastructure-showcase error-tracking --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/diet103/claude-code-infrastructure-showcase.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/error-tracking .gemini/skills/error-tracking && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "error-tracking" agent skill from https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.agents/skills/error-tracking into .gemini/skills/error-tracking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-tracking", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install diet103/claude-code-infrastructure-showcase error-trackingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add diet103/claude-code-infrastructure-showcase --skill error-tracking -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/diet103/claude-code-infrastructure-showcase.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/error-tracking .github/skills/error-tracking && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "error-tracking" agent skill from https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.agents/skills/error-tracking into .github/skills/error-tracking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-tracking", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add diet103/claude-code-infrastructure-showcase --skill error-tracking -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install diet103/claude-code-infrastructure-showcase error-tracking --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/diet103/claude-code-infrastructure-showcase.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/error-tracking .opencode/skills/error-tracking && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "error-tracking" agent skill from https://github.com/diet103/claude-code-infrastructure-showcase/tree/main/.agents/skills/error-tracking into .opencode/skills/error-tracking/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-tracking", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
error-trackingEnforces that every error in a service is captured to Sentry v8, with patterns for controllers, routes, cron jobs and database performance spans instead of console logging alone.
The skill states a single non-negotiable rule: every error must be captured to Sentry, never left as a console.error call alone, and applies whenever error handling is added, a new controller or route is created, a cron job is instrumented, or database performance needs tracking. It shows the pattern for controller-level error handling through a BaseController helper, and a separate pattern for routes that do not go through that base class, importing the Sentry Node SDK directly.
A further example shows a domain-specific Sentry helper used for workflow error handling, built in an earlier production project, so a team can build an equivalent helper for its own domain and call it the same way at each call site. The skill notes one example service as a complete reference implementation, with Sentry v8 fully integrated, all workflow errors tracked, background job processors instrumented and test endpoints available to check the integration.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 07f75ce. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
curlFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Sentry v8 Error Tracking loads about 2.3k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 442 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
- `config.ini` or `.env` - Sentry DSN and settingsAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from diet103/claude-code-infrastructure-showcase at commit 07f75ce, republished under its MIT licence (© diet103). 442 words, ~2,346 tokens.
.claude/skills/error-tracking/SKILL.md (or your agent's skills folder).This skill enforces comprehensive Sentry error tracking and performance monitoring across all services following Sentry v8 patterns.
ALL ERRORS MUST BE CAPTURED TO SENTRY - No exceptions. Never use console.error alone.
// ✅ CORRECT - Use BaseController
import { BaseController } from '../controllers/BaseController';
export class MyController extends BaseController {
async myMethod() {
try {
// ... your code
} catch (error) {
this.handleError(error, 'myMethod'); // Automatically sends to Sentry
}
}
}import * as Sentry from '@sentry/node';
router.get('/route', async (req, res) => {
try {
// ... your code
} catch (error) {
Sentry.captureException(error, {
tags: { route: '/route', method: 'GET' },
extra: { userId: req.user?.id }
});
res.status(500).json({ error: 'Internal server error' });
}
});Example of a domain-specific Sentry helper from the original production project. If you build a helper like this for your domain, the call site looks like:
import { WorkflowSentryHelper } from '../workflow/utils/sentryHelper';
WorkflowSentryHelper.captureWorkflowError(error, {
workflowCode: 'INVOICE_APPROVAL',
instanceId: 123,
stepId: 456,
userId: 'user-123',
operation: 'stepCompletion',
metadata: { additionalInfo: 'value' }
});Without a helper, plain Sentry works everywhere:
Sentry.captureException(error, {
tags: { operation: 'stepCompletion' },
extra: { workflowCode: 'INVOICE_APPROVAL', instanceId: 123, userId: 'user-123' }
});#!/usr/bin/env node
// FIRST LINE after shebang - CRITICAL!
import '../instrument';
import * as Sentry from '@sentry/node';
async function main() {
return await Sentry.startSpan({
name: 'cron.job-name',
op: 'cron',
attributes: {
'cron.job': 'job-name',
'cron.startTime': new Date().toISOString(),
}
}, async () => {
try {
// Your cron job logic
} catch (error) {
Sentry.captureException(error, {
tags: {
'cron.job': 'job-name',
'error.type': 'execution_error'
}
});
console.error('[Job] Error:', error);
process.exit(1);
}
});
}
main()
.then(() => {
console.log('[Job] Completed successfully');
process.exit(0);
})
.catch((error) => {
console.error('[Job] Fatal error:', error);
process.exit(1);
});Example from the original production project - a small helper that wraps DB calls in Sentry spans. Adapt to your codebase:
import { DatabasePerformanceMonitor } from '../utils/databasePerformance';
const result = await DatabasePerformanceMonitor.withPerformanceTracking(
'findMany',
'UserProfile',
async () => {
return await PrismaService.main.userProfile.findMany({
take: 5,
});
}
);The universally-available equivalent is a direct Sentry span:
const result = await Sentry.startSpan({
name: 'db.userProfile.findMany',
op: 'db.query',
attributes: { 'db.model': 'UserProfile', 'db.operation': 'findMany' }
}, async () => {
return await prisma.userProfile.findMany({ take: 5 });
});import * as Sentry from '@sentry/node';
const result = await Sentry.startSpan({
name: 'operation.name',
op: 'operation.type',
attributes: {
'custom.attribute': 'value'
}
}, async () => {
// Your async operation
return await someAsyncOperation();
});Use appropriate severity levels:
import * as Sentry from '@sentry/node';
Sentry.withScope((scope) => {
// ALWAYS include these if available
scope.setUser({ id: userId });
scope.setTag('service', 'api'); // your service name
scope.setTag('environment', process.env.NODE_ENV);
// Add operation-specific context
scope.setContext('operation', {
type: 'workflow.start',
workflowCode: 'INVOICE_APPROVAL',
entityId: 123
});
Sentry.captureException(error);
});Location: ./api/src/instrument.ts
import * as Sentry from '@sentry/node';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV || 'development',
integrations: [
nodeProfilingIntegration(),
],
tracesSampleRate: 0.1,
profilesSampleRate: 0.1,
});Key Helpers:
DatabasePerformanceMonitor - DB query trackingBaseController - Controller error handlingLocation: ./notifications/src/instrument.ts
import * as Sentry from '@sentry/node';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
Sentry.init({
dsn: process.env.SENTRY_DSN,
environment: process.env.NODE_ENV || 'development',
integrations: [
nodeProfilingIntegration(),
],
tracesSampleRate: 0.1,
profilesSampleRate: 0.1,
});Key Helpers:
BaseController - Controller error handling[sentry]
dsn = your-sentry-dsn
environment = development
tracesSampleRate = 0.1
profilesSampleRate = 0.1
[databaseMonitoring]
enableDbTracing = true
slowQueryThreshold = 100
logDbQueries = false
dbErrorCapture = true
enableN1Detection = true# Test basic error capture
curl http://localhost:3000/api/sentry/test-error
# Test performance tracking
curl http://localhost:3000/api/sentry/test-performance
# Test database performance
curl http://localhost:3000/api/sentry/test-database-performanceCreate test endpoints in your services to verify Sentry integration works end-to-end.
import * as Sentry from '@sentry/node';
// Automatic transaction tracking for Express routes
app.use(Sentry.Handlers.requestHandler());
app.use(Sentry.Handlers.tracingHandler());
// Manual transaction for custom operations
const transaction = Sentry.startTransaction({
op: 'operation.type',
name: 'Operation Name',
});
try {
// Your operation
} finally {
transaction.finish();
}❌ NEVER use console.error without Sentry ❌ NEVER swallow errors silently ❌ NEVER expose sensitive data in error context ❌ NEVER use generic error messages without context ❌ NEVER skip error handling in async operations ❌ NEVER forget to import instrument.ts as first line in cron jobs
When adding Sentry to new code:
src/instrument.ts - Sentry initialization (imported first)src/utils/sentryHelper.ts - Domain-specific error helperssrc/utils/databasePerformance.ts - DB monitoringsrc/controllers/BaseController.ts - Controller base with Sentryconfig.ini or .env - Sentry DSN and settingssentry.ini - Shared Sentry config (optional)© diet103, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/error-tracking of diet103/claude-code-infrastructure-showcase.
Open the folder on GitHubat commit 07f75ce
We found 9 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in diet103/claude-code-infrastructure-showcase, which our catalogue first saw on October 7, 2026.
Sentry v8 Error Tracking next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Sentry v8 Error Tracking this skilldiet103/claude-code-infrastructure-showcase | 10k | 2 repos | ~2.3k | Automated safety check: Notes | MIT | |
| Logging Observabilitygetsentry/toolkit | 917 | — | ~2.6k | Automated safety check: Pass | Custom licence | |
| Error HandlerEliasOulkadi/shokunin | 114 | — | ~3.6k | Automated safety check: Notes | MIT | |
| Logging and Error Reporting for Warpwarpdotdev/warp | 65k | 1 repos | ~5.6k | Automated safety check: Pass | AGPL-3.0 | |
| Error Handlingericrisco/rsc-harness | 156 | — | ~3.2k | Automated safety check: Pass | MIT | |
| Inngest Durable FunctionsAsymmetric-al/core | 382 | — | ~4k | Automated safety check: Pass | AGPL-3.0 |
getsentry/toolkit
Review code for correct logging and error handling patterns.
EliasOulkadi/shokunin
Design error handling, structured logging, and observability with OpenTelemetry (traces, metrics, logs), error classification, recovery patterns (retry with jitter, circuit breaker, bulkhead…
warpdotdev/warp
Guides log level choices and when to raise a structured Sentry event instead of a plain log line in the Warp Rust codebase, keeping secrets out of logs.
ericrisco/rsc-harness
A skill your agent uses when designing the reaction to a class of failures — typed error taxonomies, retry/backoff/timeout policy, circuit breakers, React/Next error boundaries, and the user-message…
Asymmetric-al/core
A skill your agent uses when building functions that must survive process crashes, retry automatically on failure, run on a schedule, react to events, or maintain state across infrastructure…
lizhiyao/sentry-miniapp
Full Sentry SDK setup for Mini Programs — error monitoring, tracing, offline cache, source maps.
diet103/claude-code-infrastructure-showcase
A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.
diet103/claude-code-infrastructure-showcase
Sets layered architecture and coding rules for Node.js, Express and TypeScript microservices, covering routes, controllers, services, repositories, Prisma, Sentry and Zod.
diet103/claude-code-infrastructure-showcase
Guidelines for React 18 and TypeScript apps covering Suspense data fetching, lazy loading, feature folders, MUI v7 styling, TanStack Router and performance.
diet103/claude-code-infrastructure-showcase
Run the infrastructure health check and fix anything that fails
Works with
Categories
Enforces that every error in a service is captured to Sentry v8, with patterns for controllers, routes, cron jobs and database performance spans instead of console logging alone. error call alone, and applies whenever error handling is added, a new controller or route is created, a cron job is instrumented, or database performance needs tracking. It shows the pattern for controller-level error handling through a BaseController helper, and a separate pattern for routes that do not go through that base class, importing the Sentry Node SDK directly.
Sentry v8 Error Tracking fits situations like: adding error handling to a new or existing route or controller; instrumenting a cron job or background processor for error tracking; adding a performance span around a database operation.
Run `npx skills add diet103/claude-code-infrastructure-showcase --skill error-tracking -a claude-code`. Or copy the skill folder (.agents/skills/error-tracking in diet103/claude-code-infrastructure-showcase) into .claude/skills/error-tracking in your project. Claude Code loads it when a task matches its description.
Run `npx skills add diet103/claude-code-infrastructure-showcase --skill error-tracking -a codex`. Or copy the skill folder (.agents/skills/error-tracking in diet103/claude-code-infrastructure-showcase) into .agents/skills/error-tracking in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add diet103/claude-code-infrastructure-showcase --skill error-tracking -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/error-tracking, .gemini/skills/error-tracking, .github/skills/error-tracking and .opencode/skills/error-tracking in your project.
Going by SKILL.md and its folder, Sentry v8 Error Tracking needs the command-line tools its instructions call (curl). Our summary lists: Sentry v8 SDK (@sentry/node) configured for the service.
SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Sentry v8 Error Tracking is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Sentry v8 Error Tracking: Logging Observability (getsentry/toolkit, 917 stars), Error Handler (EliasOulkadi/shokunin, 114 stars), Logging and Error Reporting for Warp (warpdotdev/warp, 65k stars) and Error Handling (ericrisco/rsc-harness, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
diet103 (a GitHub user) maintains it in diet103/claude-code-infrastructure-showcase, which has 10,030 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on July 13, 2026.
Source: diet103/claude-code-infrastructure-showcase on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.