Skip to content
Skillpedia
Deploy & cloud (DevOps)41k Β· #6870

investigating-error-issue

What it does

This skill gathers the context for one error issue, including who is affected, when it began and whether a release, browser or feature flag is involved. It is for developers and support staff who need to understand a single bug.

When to use it

  • βœ“When someone sends you a PostHog error issue link and asks what is going on.
  • βœ“When you need to know how many users an error affects and when it started.
  • βœ“When you want to see whether an error is linked to a release, browser or feature flag.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/investigating-error-issue/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œLook at this error issue link and tell me who is affected and whether it started with a recent release.”

5 new skills a week. 1 minute to read.

How it works

It pulls the issue's summary, sample error events, breakdowns by browser and release, and linked session replays. It then combines them into a short explanation and a next step.

Technical content (original SKILL.md)

Original text by the author, straight from 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

FAQ

Do I need to give it the issue ID?

You can paste the issue link or give the ID, and the skill will look it up.

Can it show me a session replay?

Yes. It can find linked replays of users who hit the error, so you can see what happened.

Does it work for server-side errors too?

Yes. It can also check OpenTelemetry logs around the time of the error.

Details

Original description by the author

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

Popularity

GitHub stars
41k
Ranking position
#6870
License
β€”
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills