investigating-error-issue

Investigates a PostHog error tracking issue end-to-end with metrics, breakdowns, and replays.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill investigating-error-issue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: investigating-error-issue
Source: https://github.com/PostHog/posthog-foss/tree/main/products/error_tracking/skills/investigating-error-issue
Command: npx skills add https://github.com/PostHog/posthog-foss --skill investigating-error-issue

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When an error tracking issue appears in PostHog, understanding who it affects, what triggers it, and whether a release or feature flag caused it requires manually assembling data from many queries. This Skill automates that investigation in one pass, producing a hypothesis-grade summary.

Core Features & Use Cases

  • Issue Baseline & Sparkline: Fetches compact issue details (status, assignee, top frame, occurrences, users, sessions) plus a volume sparkline to classify the error's shape (spike, ramp, steady, bursts).
  • Segment Breakdowns via SQL: Runs targeted breakdowns by app version, release, browser, OS, URL, or feature flag variant to isolate the cause, with correct handling of $app_version vs $lib_version vs $exception_releases.
  • Context Reconstruction: Pulls surrounding session events, session-replay console logs, and OTEL server logs around the exception timestamp, and links representative session recordings.
  • Use Case: A user pastes an issue URL like /error_tracking/<id> and asks "what's going on with this error?" — the Skill returns what the error is, who it affects, when it started, the likely cause, and a concrete next step.

Quick Start

Investigate this PostHog error tracking issue and tell me who it affects, when it started, and the likely cause: /error_tracking/<issue_id>.

Frequently Asked Questions about investigating-error-issue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I investigate a PostHog error tracking issue?

Provide the issue ID or paste the issue URL, and the Skill fetches the issue baseline with a volume sparkline, samples exception events, runs breakdowns by version or browser, and synthesizes a summary with likely cause and next step.

How to find which app version introduced an error in PostHog?

Run a SQL breakdown grouping $exception events by properties.$app_version and compare each version's first_seen to the issue's overall first_seen. On web and server projects $app_version must be set manually; fall back to $exception_releases or a per-day timeline.

What is the difference between $app_version and $lib_version in PostHog?

$app_version is the user's deployed app version, auto-captured on iOS and React Native and set manually elsewhere. $lib_version is the PostHog SDK library version present on every event, so it only answers whether an SDK upgrade caused the error.

Can I check if a feature flag correlates with an error?

Yes. Query the per-flag value column properties.$feature/<flag-key> grouped by variant and compare the split against overall flag exposure. Enumerating $active_feature_flags only shows which flags were evaluated, not which correlates with the error.

Why does my error breakdown return all NULL app versions?

Web, server, Node, Java, and Python SDKs do not auto-capture $app_version, so the customer must set it via register or a context provider. The Skill flags this in the synthesis and falls back to release metadata or a timestamp timeline.

Why does arrayJoin on $active_feature_flags fail in ClickHouse?

The property is a Nullable(String) JSON-encoded column, so arrayJoin fails directly and JSONExtract refuses nullable input at query planning. Wrap it in ifNull(toString(...), '[]') before calling JSONExtract with Array(String).