sentry
БесплатноБез исполняемых скриптовНе проверенSentry captures application errors, traces performance, records session replays and tracks release health. Use this skill when integrating Sentry SDKs…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Sentry
Overview
Sentry is an error monitoring and performance platform that captures unhandled exceptions, tracks request performance with Web Vitals, records session replays, and alerts on regressions. It supports JavaScript, Python, Go, and mobile platforms with auto-instrumentation, source-mapped stack traces, and release health tracking.
Instructions
- Install. For Next.js run
npx @sentry/wizard@latest -i nextjs. It createsinstrumentation-client.ts(browser),sentry.server.config.ts,sentry.edge.config.ts,instrumentation.ts,app/global-error.tsx, wrapsnext.config.tsinwithSentryConfig, and adds/sentry-example-pageto trigger a test error. The oldsentry.client.config.tsfile is replaced byinstrumentation-client.ts. Other JavaScript frameworks have their own package (@sentry/react,@sentry/node,@sentry/sveltekit); Python ispip install sentry-sdk. - Init. Call
Sentry.init()withdsn,environment,releaseandtracesSampleRate. Read the DSN from an environment variable such asNEXT_PUBLIC_SENTRY_DSN.sendDefaultPiiis off by default; turn it on only if you accept IP addresses and request headers being sent. - Errors. Call
Sentry.setUser({ id })after login,Sentry.setTag()for filterable values,Sentry.captureException(err)for handled errors, andignoreErrorsfor known noise (browser extensions,ResizeObserver loopwarnings, third-party scripts). - Source maps. Generate maps in the build and upload them from CI. With Vite use
@sentry/vite-plugin(placed after the other plugins),build.sourcemap: "hidden",authToken: process.env.SENTRY_AUTH_TOKENandsourcemaps.filesToDeleteAfterUploadso the.mapfiles are not served publicly. The Next.js wizard sets this up throughwithSentryConfig({ org, project }); the token goes inSENTRY_AUTH_TOKEN, never in the repository. - Performance.
tracesSampleRateof 0.1 in production (1.0 only in development), or atracesSamplerfunction to sample by route. Custom spans useSentry.startSpan({ name, op, attributes }, callback). SettracePropagationTargetsso traces continue into your own APIs. Web Vitals (LCP, CLS, INP) come from the browser tracing integration. - Alerts. Create issue alert rules and metric alerts in Alerts, targeting error-rate spikes or new issues per environment, and send them to Slack or PagerDuty through the integration.
- Session Replay. Add
integrations: [Sentry.replayIntegration()]withreplaysSessionSampleRate: 0.1andreplaysOnErrorSampleRate: 1.0. Replay masks all text and blocks media by default; keep that for anything with personal data and unmask only specific elements. - Releases. Set
releaseto the git SHA, link commits withsentry-cli releases set-commits "$VERSION" --auto(needs a repository integration), and record deploys withsentry-cli releases --org ORGANIZATION_SLUG deploys VERSION new -e production.
Examples
Example 1: Set up Sentry for a Next.js production app
User request: "Add Sentry error monitoring and performance tracking to my Next.js app"
npx @sentry/wizard@latest -i nextjs
Then edit instrumentation-client.ts:
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
environment: process.env.NEXT_PUBLIC_APP_ENV ?? "development",
release: process.env.NEXT_PUBLIC_GIT_SHA,
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
integrations: [Sentry.replayIntegration()],
});
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;
Set SENTRY_AUTH_TOKEN as a CI secret so next build uploads source maps. Result: open /sentry-example-page, click the button, and the error appears in Issues with a readable, source-mapped stack trace within a minute.
Example 2: Python service with release tracking
User request: "Set up release tracking to identify which deployment introduced a bug"
import os
import sentry_sdk
sentry_sdk.init(
dsn=os.environ["SENTRY_DSN"],
environment=os.environ.get("APP_ENV", "production"),
release=os.environ["GIT_SHA"],
traces_sample_rate=0.1,
)
sentry-cli releases set-commits "$GIT_SHA" --auto
sentry-cli releases --org billing-platform deploys "$GIT_SHA" new -e production
Result: each issue shows the release it first appeared in, suspect commits, and a regression alert fires when a resolved issue returns in a newer release.
Guidelines
- Keep
tracesSampleRateat 0.1 or lower in production; 100% sampling costs quota and money. - Always set
environmentandreleaseso staging noise stays out of production views. - Upload source maps in CI and delete them from the deployed output; public
.mapfiles expose your source. - Alert on rates and new issues, not on every event, to avoid alert fatigue.
- Version differences m
Установить sentry в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл sentry?
Sentry captures application errors, traces performance, records session replays and tracks release health. Use this skill when integrating Sentry SDKs, configuring alerting, analyzing stack traces, uploading source maps, or tracking release health in production. Trigger words: sentry, error monitoring, error tracking, performance monitoring, source maps, session replay.
Как установить скилл sentry?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sentry запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic