Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)41k · #6870

investigating-error-issue

Skill này làm gì

Skill này thu thập bối cảnh cho một vấn đề lỗi, gồm ai bị ảnh hưởng, nó bắt đầu từ khi nào, và có phiên bản phát hành, trình duyệt hoặc feature flag nào liên quan không. Nó dành cho lập trình viên và nhân viên hỗ trợ cần hiểu một lỗi cụ thể.

Khi nào nên dùng

  • ✓Khi ai đó gửi cho bạn liên kết một vấn đề lỗi PostHog và hỏi chuyện gì đang xảy ra.
  • ✓Khi bạn cần biết một lỗi ảnh hưởng đến bao nhiêu người dùng và nó bắt đầu khi nào.
  • ✓Khi bạn muốn xem một lỗi có liên quan đến một bản phát hành, trình duyệt hoặc feature flag hay không.

Liên kết skill

https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/investigating-error-issue/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/investigating-error-issue/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Xem liên kết vấn đề lỗi này và cho tôi biết ai bị ảnh hưởng, và liệu nó có bắt đầu từ một bản phát hành gần đây không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill lấy tóm tắt vấn đề, các sự kiện lỗi mẫu, phân tích theo trình duyệt và phiên bản phát hành, cùng các phiên replay liên kết. Sau đó, skill kết hợp chúng thành một lời giải thích ngắn và một bước tiếp theo.

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.

Investigating an error tracking issue

When a user asks "what's going on with this error?" or pastes an issue URL, gather the context they would otherwise have to assemble manually: who is hitting it, what changed, where it happens, and whether a replay shows the cause.

Available tools

Tool Purpose
posthog:query-error-tracking-issue Compact issue details (status, assignee, top frame, release, aggregates)
posthog:query-error-tracking-issue-events Sampled $exception events with stack, URL, browser, $session_id
posthog:execute-sql Breakdowns, release / flag correlations, surrounding events + console logs around the error
posthog:query-logs OTEL log entries around the error timestamp for server-side issues
posthog:query-session-recordings-list Linked replays (delegate ranking to finding-replay-for-issue)
posthog:read-data-schema Confirm property keys before filtering on them

Workflow

Step 1 — Establish the issue baseline

Fetch the issue record with its compact aggregates and a sparkline:

posthog:query-error-tracking-issue
{
  "issueId": "<issue_id>",
  "dateRange": { "date_from": "-30d" },
  "includeSparkline": true,
  "volumeResolution": 12
}

Capture: name, description, status, first_seen, last_seen, assignee, total occurrences / users / sessions, top in-app frame, latest release metadata, and the volume buckets.

The sparkline tells you the shape — flat, spike, ramp, or recurring — and that shape drives the rest of the investigation. If the user only asked a status question, skip includeSparkline to save tokens.

Step 2 — Pull a sample exception event

A captured event has the stack frames, URL, browser, and properties needed to reason about cause. Pull a recent sample first, then an early one to compare.

posthog:query-error-tracking-issue-events
{
  "issueId": "<issue_id>",
  "limit": 1,
  "include": ["exception", "stacktrace", "environment", "navigation", "correlation"]
}

The tool defaults to onlyAppFrames: true, which strips vendor frames; flip to false when the bug appears to live in a third-party library — or when the response comes back with stacktrace.type: "resolved" but no frames at all (common for minified bundles where every frame looks vendor-y to the resolver, e.g. React production builds).

For the earliest sample, narrow dateRange to a tight window around the issue's first_seen (e.g. set date_from slightly before and date_to slightly after) and pass orderDirection: "ASC" so you get the earliest event in the window rather than the latest — the tool defaults to DESC, which would return a recent event and silently duplicate the first call. If recent and earliest events look materially different — different stack root, different URL pattern — the issue may be a grouping mistake. Flag for grouping-noisy-errors instead of continuing as if it were one bug.

Step 3 — Run breakdowns to isolate the cause

Breakdowns aren't a typed tool — drop into execute-sql. Run only the breakdowns the issue's shape suggests; each one costs a query and clutters the synthesis.

Sparkline shape First breakdown to try
Spike from zero By app version / release — almost always a deploy regression (see below)
Steady-state high By browser / OS — rendering or platform-specific bug
Ramp By geography or feature flag — gradual rollout exposure
Bursts then quiet By time of day or $current_url — scheduled job or specific page

Picking the right version property

PostHog emits three version-shaped fields. They mean different things and only one of them answers "what version of the user's app introduced this?":

| Property | What it is

Câu hỏi thường gặp

Tôi có cần cung cấp ID vấn đề không?

Bạn có thể dán liên kết vấn đề hoặc cung cấp ID, và skill sẽ tra cứu.

Skill có thể cho tôi xem một session replay không?

Có. Skill có thể tìm các replay liên kết của người dùng gặp lỗi, để bạn thấy chuyện gì đã xảy ra.

Skill có hoạt động với lỗi phía máy chủ không?

Có. Skill cũng có thể kiểm tra nhật ký OpenTelemetry quanh thời điểm xảy ra lỗi.

Chi tiết

Mô tả gốc của tác giả

Investigates a single PostHog error tracking issue end-to-end. Use when the user provides an issue ID or pastes an issue URL (`/error-tracking/<id>`) and wants to understand the error — who it affects, what triggers it, when it started, whether it correlates with a release, browser, OS, or feature flag, and what the next step should be. Pulls aggregated metrics, sample exception events, segment breakdowns, linked replays, and synthesizes a hypothesis-grade summary in one pass.

repo: PostHog/posthog

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6870
Giấy phép
—
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự