AGENT SKILL

error-tracking

Integrate error tracking with Sentry for frontend and backend applications. Capture, classify, deduplicate, and alert on errors with deploy-version tagging.

使用场景前端开发
License 许可
GPL-3.0
最近更新
2026-04-24
Stars
★ 1
Forks
3

01 前言 Front Matter

name
error-tracking
next
[ "incident-response", "error-classifier" ]
group
operate
workflows
[ "incident-response", "full-startup" ]
description
Integrate error tracking with Sentry for frontend and backend applications. Capture, classify, deduplicate, and alert on errors with deploy-version tagging.
prerequisites
[ "website-creation", "convex-functions" ]
user-invocable
true

03 SKILL.md 正文

Error Tracking

Set up Sentry-based error tracking across frontend and backend. Capture errors, deduplicate into issues, detect spikes, and route to the right owner.

Setup

  1. Create a Sentry project and store the DSN in environment variables.
  2. Install the Sentry SDK in the frontend app. Enable source map uploads and release tracking.
  3. Install the Sentry SDK in the backend/API layer for server-side error capture.

Classification and Routing

  1. Classify every error by source: frontend (React errors, network failures) or backend (API errors, database errors, unhandled exceptions).
  2. Classify severity: critical (app crash, data loss), warning (degraded functionality), info (handled error logged for visibility).
  3. Route frontend errors to the website owner. Route backend errors to the backend owner.

Deduplication and Issue Creation

  1. On each new error group, create a GitHub Issue with: stack trace, error context, breadcrumbs, and affected URL.
  2. Deduplicate similar errors into a single Issue. Update the occurrence count and last-seen timestamp on each new hit.
  3. Tag every error with the deploy version to identify regressions from specific releases.

Spike Detection and Alerting

  1. Track errors per minute. Alert when the rate exceeds 3x baseline within a 5-minute window.
  2. Post to Slack immediately for critical errors. Trigger incident response on confirmed spikes.

Anti-patterns

  • Creating a separate GitHub Issue for every occurrence of the same error. Deduplicate.
  • Tracking only frontend or only backend. Both are required.
  • Waiting for someone to check a dashboard to notice spikes. Alerts must be automatic.
  • Returning generic error messages without stack traces or context.

Validation

  • Sentry DSN is configured and receiving events from both frontend and backend.
  • Source maps produce readable stack traces in production.
  • A triggered test error creates a GitHub Issue with full context.
  • Duplicate errors update the existing Issue instead of creating a new one.
  • A simulated error spike fires a Slack alert within 5 minutes.
  • Errors are tagged with the correct deploy version.

04 同仓库更多 Skills