grouping-noisy-errors
Skill này làm gì
Skill này gộp các báo cáo lỗi mô tả cùng một lỗi nhưng bị tách thành nhiều vấn đề. Nó dành cho người có danh sách lỗi bị rối bởi các mục gần như giống hệt nhau.
Khi nào nên dùng
- ✓Khi bạn có nhiều vấn đề lỗi trông giống nhau và muốn chỉ giữ một mục.
- ✓Khi cùng một lỗi liên tục tạo vấn đề mới thay vì nhập vào một vấn đề đã có.
- ✓Khi bạn cần dọn dẹp các vấn đề lỗi có thông báo chứa ID hoặc đường dẫn file thay đổi.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/grouping-noisy-errors/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Vì sao tôi có hàng chục vấn đề TypeError trông giống nhau? Hãy gộp các mục trùng lặp.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill kiểm tra trước những vấn đề nào thực sự có cùng nguyên nhân, rồi gộp chúng vào một mục đích. Nó cũng đặt một quy tắc nhóm để các sự kiện sau từ cùng vị trí mã vẫn ở cùng nhau.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Grouping noisy errors
The same error can be reported as dozens of separate issues when stack frames or messages contain volatile data — random IDs, dynamic file paths, build hashes, anonymous function names. The fix is two-step: merge the existing issues into one target, then create a grouping rule so future events from the same call site share a single canonical fingerprint instead of spawning new ones.
Important up front: "same error" here is narrow. Two issues that share a name or
a sentence of message text but came from different code paths, different SDKs,
or different runtimes are different errors and should stay separate, even if
the user thinks of them as "the same kind of bug". Grouping a frontend
TypeError together with a backend TypeError because both messages contain
"undefined" destroys the signal that lets the team find each one. The criteria
in step 1 exist to keep that from happening.
Available tools
| Tool | Purpose |
|---|---|
posthog:query-error-tracking-issues-list |
Find candidate duplicate issues |
posthog:query-error-tracking-issue |
Pull compact details for an individual issue |
posthog:query-error-tracking-issue-events |
Sampled $exception events with stack and message |
posthog:error-tracking-issues-merge-create |
Merge existing issues into a target |
posthog:error-tracking-issues-split-create |
Surgically split fingerprints back out if a merge errs |
posthog:error-tracking-grouping-rules-create |
Auto-group future events into one issue |
posthog:error-tracking-grouping-rules-list |
Check existing grouping rules before adding new ones |
posthog:error-tracking-issues-partial-update |
Rename or re-describe the target after a merge |
Merge vs grouping rule
The two tools solve different halves of the problem:
- Merge is one-shot. It collapses existing issues into a target and re-attaches their events. Future events still group by their original fingerprints — if the same noisy pattern keeps producing new fingerprints, merging is a treadmill.
- Grouping rule is durable. It rewrites the fingerprint of any matching
event to
custom-rule:<rule_id>at ingestion time, so all future matches share one canonical fingerprint rather than spawning new ones. The first match either creates a new issue keyed off that fingerprint, or routes to whatever issue is already bound to it.
Use both together when the issue is recurring: merge historical duplicates
into a target issue, then create the rule. The rule API does not accept a
target issue ID — once the rule starts firing, the resulting custom-rule:...
issue can be merged into the same target so the consolidation sticks. Use
merge alone for historical sprawl that you don't expect to recur. Use a
grouping rule alone for a brand-new pattern you're getting ahead of, when
you don't need to consolidate with an existing issue.
Workflow
Step 1 — Confirm the duplicates
Search by exception type or message to find candidates:
posthog:query-error-tracking-issues-list
{
"searchQuery": "TypeError: Cannot read property",
"status": "active",
"limit": 50,
"orderBy": "occurrences",
"dateRange": { "date_from": "-30d" }
}
For each candidate, pull one sampled exception event to compare stack, type, and message:
posthog:query-error-tracking-issue-events
{
"issueId": "<candidate_issue_id>",
"limit": 1,
"include": ["exception", "stacktrace", "environment"]
}
Run this once per candidate. The tool defaults to onlyAppFrames: true, which
makes the top in-app frame stand out at a glance. If two candidates share the
same top frame and same exception type, they're likely the same error — but
verify against the full checklist below before merging.
Are they the same error?
Treat two issues as duplicates only when every one of these matches:
$libis the same SDK. The browser/JS SDK captures$libasweb(notposthog-js); server SDKs useposthog-python,posthog-node, etc. Confirm the exact value withread-data-schema(event_property_valuesfor$libon$exception) rather than assuming — a wrong value silently matches nothing. Erro
Câu hỏi thường gặp
Có gộp lỗi từ các phần khác nhau của ứng dụng không?
Không. Lỗi từ các đường dẫn mã, SDK hoặc môi trường chạy khác nhau vẫn tách riêng, ngay cả khi thông báo của chúng giống nhau.
Điều gì làm hai lỗi giống nhau?
Skill chỉ nhóm các lỗi có cùng nguyên nhân gốc, không nhóm các lỗi chỉ dùng từ ngữ tương tự.
Vì sao không gộp chỉ theo nội dung thông báo?
Hai lỗi khác nhau có thể cùng một từ chung như undefined, nên gộp chỉ theo văn bản sẽ che khuất các vấn đề thật.
Chi tiết
Mô tả gốc của tác giả
Consolidate PostHog error tracking issues that are the same actual error reported under different fingerprints. Use when the user asks "why do I have so many TypeError issues that look the same?", "merge these duplicates", "stop splitting this error into new issues", or wants to clean up fingerprint sprawl. Decides between a one-shot merge of existing issues and a durable grouping rule that keeps future events from creating new fingerprints. Does NOT group conceptually similar bugs across different runtimes, SDKs, or call sites.
repo: PostHog/posthog
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6869
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
depot-ci
41kGiúp agent của bạn thiết lập và chạy quy trình Depot CI, một lựa chọn thay thế GitHub Actions, gồm chuyển các quy trình hiện có và đọc nhật ký chạy.
depot-container-builds
41kGiúp agent của bạn build image Docker trên các builder từ xa của Depot, gồm image đa nền tảng, đẩy lên registry và sửa lỗi build.
depot-github-runners
41kGiúp agent của bạn chuyển các job GitHub Actions sang runner do Depot quản lý, chọn kích thước và nhãn runner, và xử lý lỗi thiết lập runner.
editing-agents-md
41kGiúp agent của bạn quyết định một quy tắc nên nằm trong file AGENTS.md hay CLAUDE.md, và viết sao cho quy tắc được tuân thủ mà file không bị phình to.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.