Sentry Error Tracking skill for Codex

Turn a noisy Sentry stream into a fix list. Codex triages a Sentry project in a fixed order (regressions, new in release, highest user impact) and gives each issue a decision and owner. It repairs bad grouping with fingerprint and stack trace rules, makes stack traces readable through matching releases and source map uploads, and moves recurring noise into beforeSend and inbound filters instead of mass-archiving.

  • Observability & SRE
  • $sentry-error-tracking
  • 178 lines
  • 2 files
  • ~1,850 tokens
  • MIT
  • Updated

Install

curl -fsSL codexskills.dev/install.sh \  | sh -s -- sentry-error-tracking

Installs to ~/.agents/skills/sentry-error-tracking/ for every project on this machine.

104-line POSIX script. No sudo, no telemetry. Read install.sh

Use it in Codex

Start a prompt with $sentry-error-tracking, or pick it from /skills. You can also just describe the task: Codex reads the description below and loads the playbook when your request matches.

What Codex reads before loading it

Runs a disciplined Sentry error triage workflow - prioritising issues by users affected and regressions, fixing grouping with fingerprints and stack trace rules, uploading source maps and debug files so stack traces resolve, tagging releases and environments, filtering noise in before_send, and closing the loop with resolved-in-release. Use when a Sentry project is flooded with issues, when one bug appears as hundreds of issues or many bugs merge into one, when stack traces show minified code, or when setting up a weekly error triage routine.

Use it when

  • A Sentry issue stream is too noisy to act on
  • Grouping splits one bug or merges many
  • Stack traces are minified or unsymbolicated
  • You want a repeatable weekly error triage routine

Use something else when

How to check the result

A staging smoke error appears with the correct release, environment, readable frames and owner, and duplicate variants land in one issue after the grouping rule.

The mistake it prevents

Mass-archiving issues to shrink the count, which hides regressions and teaches the team to ignore the tool.

~/.agents/skills/sentry-error-tracking/SKILL.md

--- name: sentry-error-tracking description: Runs a disciplined Sentry error triage workflow - prioritising issues by users affected and regressions, fixing grouping with fingerprints and stack… license: MIT ---

Done well means: the issue list reflects real distinct bugs, each issue has a readable stack trace tied to a release and an owner, the top issues by user impact are being worked on, and noise is filtered at the source rather than ignored by habit.

Inspect first

  1. Read AGENTS.md; find the SDK init (rg -n "Sentry.init|sentry_sdk.init|SentryAndroid|SentrySdk.Init") and note dsn, release, environment, sample rates, before_send, integrations.
  2. Check how releases are created and whether source maps or debug symbols are uploaded in CI (rg -n "sentry-cli|@sentry/.*-plugin|sentry-cli sourcemaps").
  3. If the user can give access, read the project’s issue stream. Querying the Sentry API or its MCP server needs network and an auth token the user provides; never ask for the token in chat history if an environment variable or keychain works.
  4. For first-time SDK installation or framework wiring, use $sentry-integration; this skill assumes events already arrive.

Triage order

Work the stream in this order each week (or each day for a busy product):

PriorityQuery (issue search)Action
1. Regressionsis:unresolved is:regressed (or the Regressed tab)Reopened after a fix: assign to whoever shipped the release
2. New in latest releaseis:unresolved firstRelease:<version>Likely caused by this deploy; decide rollback or hotfix
3. Highest user impactsort by Users, is:unresolvedFix the top few, not the top fifty
4. Escalatingthe Escalating / For Review viewsCheck whether volume trend is real
5. Long tailis:unresolved lastSeen:+30dResolve stale ones; archive known third-party noise

For each issue decide one of: fix now (assign, link ticket), fix later (ticket with priority), resolve in next release (fix merged), archive until condition (noise with a threshold, for example “until it affects 100 more users”), or merge (duplicate). Never mass-archive to make a number go down; that hides regressions.

Readable stack traces

  • JavaScript: generate source maps in the production build, inject debug IDs and upload with the same release. Use the bundler plugin (@sentry/vite-plugin, @sentry/webpack-plugin) or the CLI:
sentry-cli sourcemaps inject ./dist
sentry-cli sourcemaps upload --release "$RELEASE" ./dist

Do not serve .map files publicly unless you intend to; upload then delete them from the deploy artifact.

  • Native, iOS, Android: upload dSYMs, ProGuard/R8 mappings and debug files with sentry-cli debug-files upload in CI.
  • Python, Go, Java, Ruby: traces resolve server-side; make sure in-app frames are correct so grouping uses your code, not the framework.

Verify one recent event shows original file names and line numbers. If it shows app.3f9c1.js:1:28473, the release name or debug ID does not match the upload.

Releases and environments

export RELEASE="checkout-web@$(git rev-parse --short HEAD)"
sentry-cli releases new "$RELEASE"
sentry-cli releases set-commits "$RELEASE" --auto
sentry-cli releases finalize "$RELEASE"
sentry-cli deploys new --release "$RELEASE" -e production

The same release string must be passed to Sentry.init. Associating commits enables suspect commits and “resolved in next release”. All CLI calls need network and SENTRY_AUTH_TOKEN; creating deploy records is visible to the team, so run them in CI rather than ad hoc from a laptop.

Fixing grouping

Symptoms and fixes:

SymptomCauseFix
Same bug split across many issuesDynamic values in message, different minified frames per release, varying call pathsFingerprint rule on error type, or stack trace rules marking wrappers as not in-app
Many bugs merged in one issueGeneric wrapper (HttpError, fetch failed) catches everythingFingerprint including endpoint or upstream status; throw specific error types
Grouped by vendor codeThird-party frames considered in-appStack trace rule -app for vendor paths

Project settings, Issue Grouping, fingerprint rules (server-side, no deploy needed):

error.type:ConnectionRefusedError -> upstream-connection-refused
error.type:TimeoutError message:"*payments*" -> payments-timeout

Stack trace rules:

stack.abs_path:**/node_modules/** -app
stack.function:handleError -group

Client-side when the grouping key is only known in code:

import sentry_sdk

with sentry_sdk.new_scope() as scope:
    scope.fingerprint = ["upstream-error", upstream_name, str(status_code)]
    sentry_sdk.capture_exception(err)
Sentry.withScope((scope) => {
  scope.setFingerprint(['upstream-error', upstreamName, String(status)]);
  Sentry.captureException(err);
});

Grouping changes apply to new events; existing issues are not regrouped. Merge the old duplicates by hand after the rule is live.

Noise control at the source

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  release: process.env.RELEASE,
  environment: process.env.APP_ENV,
  sendDefaultPii: false,
  ignoreErrors: ['ResizeObserver loop completed with undelivered notifications'],
  denyUrls: [/extensions\//i, /^chrome:\/\//i],
  beforeSend(event, hint) {
    const err = hint.originalException;
    if (err && err.name === 'AbortError') return null; // user navigated away
    return event;
  },
});
  • Drop expected conditions (client aborts, 404s you raised on purpose) in beforeSend or by not reporting them, instead of archiving them weekly.
  • Enable inbound filters for browser extensions, legacy browsers and known crawlers.
  • Rate-limit noisy keys with spike protection and per-key rate limits rather than lowering the global sample rate, which drops rare real errors too.
  • Scrub PII: keep sendDefaultPii: false (Python send_default_pii=False), add server-side data scrubbing rules for tokens and emails, and check one event’s raw JSON.

Workflow

  • Confirm release, environment and source maps on a fresh event
  • Triage regressions, then new-in-release, then top by users
  • Fix grouping for the worst split and merged issues
  • Move recurring noise into filters or beforeSend
  • Assign owners (ownership rules or code owners) so new issues route themselves
  • Mark fixed issues “resolved in next release” so regressions are detected

Verification

  • A test error thrown in staging (Sentry.captureException(new Error('sentry-smoke'))) appears with the right release, environment, readable frames and owner.
  • After a grouping rule, trigger two variants and confirm they land in one issue (or two, if splitting).
  • Weekly: count of unresolved issues with >1 user should trend down, not just total count.

Output

A triage report: top issues by users with decision and owner, regressions linked to releases, grouping changes made, filters added, and anything archived with its condition.

Gotchas

  • Sample rate for errors (sampleRate) is not the same as tracesSampleRate; lowering the wrong one loses errors.
  • Release names must match exactly between SDK, source map upload and deploy record, including the package prefix.
  • Errors swallowed and logged but never thrown or captured do not reach Sentry; check catch blocks that only console.error.
  • Resolving an issue without a release lets the same bug reopen silently as “new”.

What the zip contains

SKILL.md plus the interface file below. Nothing runs on install.

agents/openai.yamlgenerated from this page

Gives the Codex app a display name, a one-line description and a starter prompt for this skill.

interface:
  display_name: "Sentry Error Tracking"
  short_description: "Turn a noisy Sentry stream into a fix list"
  default_prompt: "$sentry-error-tracking Our Sentry project has 3,000 unresolved issues, help me triage what matters"

About this skill

Written and maintained by the Codex Skills editors to the same editorial standard as every skill here: a selective description, a real workflow, known pitfalls and a way to verify the work. First published , last updated . MIT licensed. Something wrong or out of date? Tell us.

esc
Just launched

Codex Skills Pro is live

79 premium skills for Codex, each with scripts, references and an evidence report that proves the result.

Bought one by one$882.21
All 79 skills$49
94% off

That's $0.62 a skill, paid once.

Get all 79 for $49Or pick single skills from $4.99 →

Secure checkout by Creem