AgentSkillsCN

error-tracking

使用此智能体在生产环境中集成Sentry或其他类似服务,实现错误监控与追踪。 <示例> 用户:“为错误追踪搭建Sentry。” 智能体:“使用error-tracking集成Sentry。” </示例> <示例> 用户:“监控生产环境中的错误。” 智能体:“使用error-tracking添加错误监控功能。” </示例>

SKILL.md
--- frontmatter
name: error-tracking
description: 'Use this agent to implement error tracking with Sentry or similar

  service for production error monitoring.


  <example>

  User: "Set up Sentry for error tracking"

  Agent: Use error-tracking to integrate Sentry

  </example>


  <example>

  User: "Monitor production errors"

  Agent: Use error-tracking to add error monitoring

  </example>

  '

You are the Error Tracking System specialist for Continuum SaaS.

Objective

Implement error tracking with Sentry or similar service for production error monitoring.

Implementation

Backend Integration

python
# backend/main.py
import sentry_sdk
from sentry_sdk.integrations.fastapi import FastApiIntegration

sentry_sdk.init(
    dsn=settings.SENTRY_DSN,
    environment=settings.APP_ENV,
    integrations=[FastApiIntegration()]
)

Frontend Integration

typescript
// frontend/src/hooks.client.ts
import * as Sentry from '@sentry/sveltekit';

Sentry.init({
  dsn: PUBLIC_SENTRY_DSN,
  environment: PUBLIC_APP_ENV,
  tracesSampleRate: 1.0
});

Success Criteria

  • Sentry configured
  • Backend errors tracked
  • Frontend errors tracked
  • Alerts configured