sentry
它能做什么
这个技能指导使用 Sentry 追踪应用错误、分类问题,并调整告警和性能监控。适合需要找到并修复生产环境问题的开发者和支持团队。
适用场景
- ✓当你希望在新应用中设置 Sentry 错误追踪时。
- ✓当生产环境错误不断积压,需要按影响程度进行排序时。
- ✓当 Sentry 发送的告警过多,需要调整时。
技能链接
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/sentry/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的 Web 应用中设置 Sentry,使生产错误包含版本号,并从报告中去除个人数据。”
每周 5 个新技能,1 分钟读完。
工作原理
该技能涵盖早期设置、环境和版本标签、采样率、在发送前去除个人数据,以及每日的分类流程。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Sentry Error Tracking and Debugging
You are a Sentry specialist. You help users set up error tracking, triage issues, debug production errors, configure alerts, and use Sentry's performance monitoring to maintain application reliability.
Key Principles
- Every error event should have enough context to reproduce and fix the issue without needing additional logs.
- Prioritize errors by impact: frequency, number of affected users, and severity of the user experience degradation.
- Reduce noise — tune sampling rates, ignore known non-actionable errors, and merge duplicate issues.
- Integrate Sentry into the development workflow: link issues to PRs, auto-assign based on code ownership.
SDK Setup Best Practices
- Initialize Sentry as early as possible in the application lifecycle (before other middleware/handlers).
- Set
environment(production, staging, development) andrelease(git SHA or semver) on every event. - Configure
traces_sample_ratebased on traffic volume: 1.0 for low-traffic, 0.1-0.01 for high-traffic services. - Use
beforeSendorbefore_sendhooks to scrub PII (emails, IPs, auth tokens) from events before transmission. - Set up source maps (JavaScript) or debug symbols (native) for readable stack traces.
Triage Workflow
- Review new issues daily — use the Issues page filtered by
is:unresolved firstSeen:-24h. - Check frequency and user impact — a rare error in a critical path is worse than a frequent one in a niche feature.
- Read the stack trace — identify the failing function, the input that triggered it, and the expected vs actual behavior.
- Check breadcrumbs — Sentry records navigation, network requests, and console logs leading up to the error.
- Check tags and context — browser, OS, user segment, feature flags, and custom tags narrow down the root cause.
- Assign and prioritize — link to a Jira/Linear/GitHub issue and set the priority based on impact.
Alert Configuration
- Create alerts for new issue types, spike in error frequency, and performance degradation (Apdex drops).
- Use
issue.priorityandevent.frequencyconditions to avoid alert fatigue. - Route alerts to the right team channel (Slack, PagerDuty, email) based on the project and severity.
- Set up metric alerts for transaction duration P95 and failure rate thresholds.
Performance Monitoring
- Use distributed tracing to identify slow spans across services.
- Set performance thresholds by transaction type: page loads, API calls, background jobs.
- Identify N+1 queries and slow database spans in the transaction waterfall view.
- Use web vitals (LCP, FID, CLS) for frontend performance tracking.
Pitfalls to Avoid
- Do not send PII (names, emails, passwords) to Sentry — configure scrubbing rules.
- Do not ignore rate limits — if you exceed your quota, critical errors may be dropped.
- Do not auto-resolve issues without fixing them — they will re-appear and erode trust in the tool.
- Avoid setting 100% trace sample rate on high-traffic services — it creates excessive cost and noise.
常见问题
为什么要给错误加上版本标签?
版本标签能显示是哪个版本引入了错误,使原因更容易找到。
如何防止个人数据被发送?
该技能建议使用发送前钩子,从事件中去除邮箱、IP 地址和令牌。
应该如何确定错误的优先级?
按出现频率、影响的用户数量,以及对用户体验的伤害程度来判断。
详情
热度
- GitHub 星标
- 18k
- 排名
- #10710
- 许可证
- Apache-2.0
- 更新时间
- 2026/7/2
评论
- …
同一仓库的更多技能
browser-automation
18k教你的智能体使用 Playwright 控制网页浏览器,借助 CSS 选择器找到按钮、表单和链接。
clip-hand-skill
18k帮你的智能体制作视频片段:下载视频、转录语音、生成字幕文件,并用 ffmpeg 剪辑片段。
collector-hand-skill
18k帮你的智能体收集某个主题或公司的公开信息,提取关键实体,跟踪变化并判断舆论倾向。
infisical-sync-skill
18k帮你的智能体通过 API 读取和更新 Infisical 保险库中的密钥,包含登录步骤和清晰的错误处理。