suppressing-noisy-errors
它能做什么
本技能创建规则,阻止 PostHog 记录你无法修复的错误,例如由浏览器扩展或机器人引起的错误。适合希望减少干扰、降低成本的团队。
适用场景
- ✓当浏览器扩展错误充斥你的错误列表,而你又无法修复它们的时候。
- ✓当机器人或爬虫流量产生大量无用错误报告时。
- ✓当某个错误无害但出现非常频繁,你想降低其成本又不想完全失去可见性的时候。
技能链接
https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/suppressing-noisy-errors/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请停止记录 ResizeObserver loop 错误和来自浏览器扩展的错误。”
每周 5 个新技能,1 分钟读完。
工作原理
它会找出嘈杂的错误,然后编写一个范围较窄的过滤器,只在事件成为问题之前丢弃匹配的事件。对于频繁但有用的错误,它可以改为降低采样率。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Suppressing noisy errors
Suppression is destructive in spirit: matching events are dropped at ingestion and never become issues. The wrong rule silently throws away real bugs. This skill exists to make sure suppression is applied only to patterns that are genuinely unactionable, with filters narrow enough to avoid swallowing unrelated errors.
When suppression is the right tool
Suppression is the right tool when an error is:
- Unactionable from your code — browser extensions, third-party scripts, ad blockers, network beacons firing after navigation. You can't fix it because you didn't write it.
- Browser engine quirks —
ResizeObserver loop limit exceeded,Script error.,Non-Error promise rejection capturedwith empty payloads. - Bot or crawler traffic — errors firing only from headless browsers or known crawler user agents.
- Sampling already enough — for high-volume but real errors, dampen with
sampling_rateinstead of full suppression so you keep visibility without paying full cost.
Suppression is not the right tool when:
- The error is unactionable today but might become actionable after a fix —
use issue status
archivedorresolvedinstead so it surfaces if it returns. - You only want to mute notifications — assign the issue to a user, change its status, or use notification rules.
- The error is a duplicate of another — merge or create a grouping rule
(
grouping-noisy-errors).
Available tools
| Tool | Purpose |
|---|---|
posthog:query-error-tracking-issues-list |
Find suppression candidates by volume and impact; dry-run a candidate filter via filterGroup |
posthog:query-error-tracking-issue-events |
Inspect sampled $exception events to confirm the pattern |
posthog:execute-sql |
Fallback dry-run for filters that need OR groups or operators outside the filterGroup allowed list |
posthog:error-tracking-suppression-rules-list |
Check existing suppression rules |
posthog:error-tracking-suppression-rules-create |
Create the suppression rule |
posthog:error-tracking-issues-partial-update |
Hide past data via issue status without dropping events at ingestion |
Workflow
Step 1 — Identify candidates
High occurrences with low distinct users is the strongest noise signal — one user (or one bot) producing many events.
posthog:query-error-tracking-issues-list
{
"status": "active",
"orderBy": "occurrences",
"orderDirection": "DESC",
"dateRange": { "date_from": "-7d" },
"limit": 30,
"volumeResolution": 0
}
Look for:
- High
occurrences, lowusersratio (e.g., 50,000 occurrences, 3 users → likely bot or extension loop) - Exception messages matching known noise patterns:
ResizeObserver loop,Script error., extension namespaces (chrome-extension://,moz-extension://,safari-extension://) - Stack traces dominated by third-party domains the user doesn't control
Step 2 — Confirm the pattern
For each candidate, pull a sample of $exception events and check that the
pattern matches what you intend to suppress:
posthog:query-error-tracking-issue-events
{
"issueId": "<candidate_issue_id>",
"limit": 10,
"include": ["exception", "stacktrace", "environment", "navigation"]
}
onlyAppFrames defaults to true, but for noise investigation you usually
want the third-party frames visible — pass onlyAppFrames: false so extension
URLs and vendor domains show up in the stack.
Confirm:
- The exception type or message text is consistent across the sample
- The URLs / user agents / browsers don't include real user traffic mixed in with the noise
- Suppressing this pattern won't hide a future real bug that happens to share the type
If any sample doesn't match, narrow the filter or skip the candidate.
Step 3 — Scope the filter tightly
Suppression rules are configured with the same filter shape as grouping rules. The `e
常见问题
屏蔽错误会隐藏真正的漏洞吗?
如果过滤器过于宽泛,可能会。本技能会保持过滤器范围精确,避免丢弃无关的错误。
有没有办法隐藏某个错误而不丢弃它?
有。归档或解决某个问题后,如果它再次出现,仍会显示;更改负责人或通知设置,只会改变谁会收到提醒。
什么是采样?
采样只记录符合条件事件的一部分,因此你在支付较少成本的同时,仍能保留一定的可见性。
详情
作者的原始描述
Create PostHog error tracking suppression rules to drop high-volume, low-value errors at ingestion. Use when the user asks "stop capturing this error", "drop browser extension errors", "ignore ResizeObserver loops", "suppress bot-driven errors", or wants to reduce ingestion cost from noisy unactionable errors. Identifies suppression candidates, scopes the filter tightly, decides between full suppression and sampling, and confirms the rule before creating it. Suppressed errors are dropped permanently — this skill defaults to caution.
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6872
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。