跳到正文
Skillpedia
部署与云(DevOps)41k · #6870

investigating-error-issue

它能做什么

本技能收集某个错误问题的背景信息,包括受影响的人员、开始时间,以及是否涉及某次发布、浏览器或功能开关。适合需要了解单个缺陷的开发者和支持人员。

适用场景

  • ✓当有人发来一个 PostHog 错误问题的链接,并询问发生了什么时。
  • ✓当你需要知道某个错误影响了多少用户,以及它何时开始的时候。
  • ✓当你想查看某个错误是否与某次发布、浏览器或功能开关相关时。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/investigating-error-issue/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请查看这个错误问题的链接,告诉我受影响的是谁,以及它是否始于最近的一次发布。”

每周 5 个新技能,1 分钟读完。

工作原理

它会提取该问题的摘要、示例错误事件、按浏览器和发布版本的细分,以及关联的会话回放。然后,它将这些信息综合为一段简短的解释和下一步建议。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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

常见问题

我需要提供问题 ID 吗?

你可以粘贴问题链接或提供 ID,本技能会查找该问题。

它能显示会话回放吗?

可以。它可以找到遇到该错误的用户的关联回放,让你看到当时发生了什么。

它也适用于服务器端错误吗?

适用。它还可以检查错误发生时间前后的 OpenTelemetry 日志。

详情

作者的原始描述

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

热度

GitHub 星标
41k
排名
#6870
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能