[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-posthog-investigating-error-issue":3,"mdc--dvrrzt-key":46,"related-org-posthog-investigating-error-issue":2732,"related-repo-posthog-investigating-error-issue":2899},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":41,"sourceUrl":44,"mdContent":45},"investigating-error-issue","investigate PostHog error tracking issues","Investigates a single PostHog error tracking issue end-to-end. Use when the user provides an issue ID or pastes an issue URL (`\u002Ferror_tracking\u002F\u003Cid>`) 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.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"posthog","PostHog","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fposthog.png",[12,16,17],{"name":13,"slug":14,"type":15},"Observability","observability","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Debugging","debugging",35568,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog","2026-07-31T05:51:58.608303",null,2977,[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"ab-testing","ai-analytics","analytics","cdp","data-warehouse","experiments","feature-flags","javascript","product-analytics","python","react","session-replay","surveys","typescript","web-analytics",{"repoUrl":21,"stars":20,"forks":24,"topics":42,"description":43},[26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"🦔 PostHog is an all-in-one developer platform for building successful products. We offer product analytics, web analytics, session replay, error tracking, feature flags, experimentation, surveys, data warehouse, a CDP, and an AI product assistant to help debug your code, ship features faster, and keep all your usage and customer data in one stack.","https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog\u002Ftree\u002FHEAD\u002Fproducts\u002Ferror_tracking\u002Fskills\u002Finvestigating-error-issue","---\nname: investigating-error-issue\ndescription: >\n  Investigates a single PostHog error tracking issue end-to-end. Use when\n  the user provides an issue ID or pastes an issue URL\n  (`\u002Ferror_tracking\u002F\u003Cid>`) and wants to understand the error — who it\n  affects, what triggers it, when it started, whether it correlates with\n  a release, browser, OS, or feature flag, and what the next step should\n  be. Pulls aggregated metrics, sample exception events, segment\n  breakdowns, linked replays, and synthesizes a hypothesis-grade summary\n  in one pass.\n---\n\n# Investigating an error tracking issue\n\nWhen a user asks \"what's going on with this error?\" or pastes an issue URL, gather\nthe context they would otherwise have to assemble manually: who is hitting it, what\nchanged, where it happens, and whether a replay shows the cause.\n\n## Available tools\n\n| Tool                                        | Purpose                                                                                     |\n| ------------------------------------------- | ------------------------------------------------------------------------------------------- |\n| `posthog:query-error-tracking-issue`        | Compact issue details (status, assignee, top frame, release, aggregates)                    |\n| `posthog:query-error-tracking-issue-events` | Sampled `$exception` events with stack, URL, browser, `$session_id`                         |\n| `posthog:execute-sql`                       | Breakdowns, release \u002F flag correlations, surrounding events + console logs around the error |\n| `posthog:query-logs`                        | OTEL log entries around the error timestamp for server-side issues                          |\n| `posthog:query-session-recordings-list`     | Linked replays (delegate ranking to `finding-replay-for-issue`)                             |\n| `posthog:read-data-schema`                  | Confirm property keys before filtering on them                                              |\n\n## Workflow\n\n### Step 1 — Establish the issue baseline\n\nFetch the issue record with its compact aggregates and a sparkline:\n\n```json\nposthog:query-error-tracking-issue\n{\n  \"issueId\": \"\u003Cissue_id>\",\n  \"dateRange\": { \"date_from\": \"-30d\" },\n  \"includeSparkline\": true,\n  \"volumeResolution\": 12\n}\n```\n\nCapture: `name`, `description`, `status`, `first_seen`, `last_seen`, `assignee`,\ntotal `occurrences` \u002F `users` \u002F `sessions`, top in-app frame, latest release\nmetadata, and the volume buckets.\n\nThe sparkline tells you the shape — flat, spike, ramp, or recurring — and that\nshape drives the rest of the investigation. If the user only asked a status\nquestion, skip `includeSparkline` to save tokens.\n\n### Step 2 — Pull a sample exception event\n\nA captured event has the stack frames, URL, browser, and properties needed to\nreason about cause. Pull a recent sample first, then an early one to compare.\n\n```json\nposthog:query-error-tracking-issue-events\n{\n  \"issueId\": \"\u003Cissue_id>\",\n  \"limit\": 1,\n  \"include\": [\"exception\", \"stacktrace\", \"environment\", \"navigation\", \"correlation\"]\n}\n```\n\nThe tool defaults to `onlyAppFrames: true`, which strips vendor frames; flip to `false`\nwhen the bug appears to live in a third-party library — or when the response\ncomes back with `stacktrace.type: \"resolved\"` but no frames at all (common for\nminified bundles where every frame looks vendor-y to the resolver, e.g. React\nproduction builds).\n\nFor the earliest sample, narrow `dateRange` to a tight window around the\nissue's `first_seen` (e.g. set `date_from` slightly before and `date_to`\nslightly after) and pass `orderDirection: \"ASC\"` so you get the earliest\nevent in the window rather than the latest — the tool defaults to `DESC`,\nwhich would return a recent event and silently duplicate the first call.\nIf recent and earliest events look materially different — different stack\nroot, different URL pattern — the issue may be a grouping mistake. Flag for\n`grouping-noisy-errors` instead of continuing as if it were one bug.\n\n### Step 3 — Run breakdowns to isolate the cause\n\nBreakdowns aren't a typed tool — drop into `execute-sql`. Run only the\nbreakdowns the issue's shape suggests; each one costs a query and clutters the\nsynthesis.\n\n| Sparkline shape   | First breakdown to try                                                   |\n| ----------------- | ------------------------------------------------------------------------ |\n| Spike from zero   | By app version \u002F release — almost always a deploy regression (see below) |\n| Steady-state high | By browser \u002F OS — rendering or platform-specific bug                     |\n| Ramp              | By geography or feature flag — gradual rollout exposure                  |\n| Bursts then quiet | By time of day or `$current_url` — scheduled job or specific page        |\n\n#### Picking the right version property\n\nPostHog emits three version-shaped fields. They mean different things and only\none of them answers \"what version of the user's app introduced this?\":\n\n| Property              | What it is                                                | Auto-captured by                                                                   | Use for                                                                  |\n| --------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |\n| `$exception_releases` | Cymbal-managed release map, keyed by release ID           | Only when SDK publishes release metadata (e.g. sourcemap upload tied to a release) | Most precise release attribution **when present**                        |\n| `$app_version`        | The user's deployed app version                           | iOS (`CFBundleShortVersionString`), React Native (Expo \u002F react-native-device-info) | \"What deploy of my app introduced this?\" — the question users care about |\n| `$lib_version`        | The PostHog SDK library version (e.g. posthog-js 1.298.0) | Every SDK on every event                                                           | The narrow \"did upgrading the PostHog SDK introduce this?\" question      |\n\n`$lib_version` is on virtually every event, which makes it tempting — but it's\nthe PostHog library version, not the user's app version. A constant\n`$lib_version` paired with a spike means the user shipped a regression in\ntheir own code with the SDK unchanged, which is the common case. Reach for\n`$lib_version` only when nothing else is populated and you're explicitly\nasking \"did upgrading PostHog cause this?\".\n\nWeb \u002F server \u002F Node \u002F Java \u002F Python projects do **not** auto-capture\n`$app_version` — the customer has to set it (via `register`, a context\nprovider, or `before_send`). If the breakdown comes back with one\n`$app_version` row of all-NULL, say so explicitly in the synthesis and\nsuggest the customer wire it up; falling back to `$exception_releases` or to\na per-day timeline by `first_seen` keeps the investigation moving.\n\nExample (`$app_version` — populated automatically on mobile, manually on\nweb \u002F server):\n\n```sql\nposthog:execute-sql\nSELECT\n    properties.$app_version AS app_version,\n    count() AS occurrences,\n    uniq(person_id) AS users,\n    min(timestamp) AS first_seen,\n    max(timestamp) AS last_seen\nFROM events\nWHERE event = '$exception'\n    AND (issue_id = '\u003Cissue_id>' OR properties.$exception_issue_id = '\u003Cissue_id>')\n    AND timestamp > now() - INTERVAL 30 DAY\nGROUP BY app_version\nORDER BY occurrences DESC\nLIMIT 20\n```\n\nThe `(issue_id = ... OR properties.$exception_issue_id = ...)` pattern\ncovers both ways an event links to its issue. `issue_id` is the\nresolved virtual field on `events` (it follows fingerprint overrides so\nmerged\u002Fsplit issues route correctly); `properties.$exception_issue_id` is\nthe raw event property captured at ingestion. Filtering on only the property\nsilently undercounts events for issues that have been merged or split.\n\nIf `first_seen` for one `app_version` is much later than the issue's overall\n`first_seen`, that release introduced or worsened the bug — strong root-cause\nsignal. If every row is `NULL`, the SDK isn't reporting an app version on\nthis project (common on web \u002F server) — switch to `$exception_releases` if\nthe customer ships releases, or fall back to a `toDate(timestamp)` timeline.\n\nWhen `$exception_releases` is populated, it's a JSON dict keyed by release\nID. There is no top-level `$release` property; query `$exception_releases`\ndirectly when you need release attribution and the customer has it wired up.\n\nRepeat with `properties.$browser`, `properties.$os`, `properties.$current_url`,\nor any feature flag the project tags errors with.\n\n### Step 4 — Check feature flag exposure\n\nIf the user suspects an experiment or rollout, check whether affected users had\na flag enabled when the error fired.\n\nTo enumerate which flags were evaluated on affected users, parse the\n`$active_feature_flags` property — it is materialized as a `Nullable(String)`\nJSON-encoded column in ClickHouse, so `arrayJoin(properties.$active_feature_flags)`\ndirectly will fail. `JSONExtract` is the working pattern, but you must coerce the\nargument to a non-nullable String first: ClickHouse refuses to return a nested\n`Array(String)` from `JSONExtract` when the input is `Nullable`, and this type\nerror is raised at query planning, so the `notEmpty(...)` guard in the WHERE\nclause does not prevent it. Wrap the argument in `ifNull(..., '[]')` (or\n`assumeNotNull(...)`):\n\n```sql\nposthog:execute-sql\nSELECT\n    arrayJoin(JSONExtract(ifNull(toString(properties.$active_feature_flags), '[]'), 'Array(String)')) AS flag,\n    count() AS occurrences,\n    uniq(person_id) AS users\nFROM events\nWHERE event = '$exception'\n    AND (issue_id = '\u003Cissue_id>' OR properties.$exception_issue_id = '\u003Cissue_id>')\n    AND timestamp > now() - INTERVAL 14 DAY\n    AND notEmpty(toString(properties.$active_feature_flags))\nGROUP BY flag\nORDER BY occurrences DESC\nLIMIT 20\n```\n\nCaveat: every event captures every evaluated flag key, so this enumeration often\nreturns identical counts across flags and **doesn't tell you which flag\ncorrelates with the error** — only which were on the user. To actually test a\nhypothesis, query the per-flag value column `properties.$feature\u002F\u003Cflag-key>`,\nwhich carries the evaluated value (`true`\u002F`false`\u002Fvariant name):\n\n```sql\nposthog:execute-sql\nSELECT\n    properties.`$feature\u002Fmy-flag-key` AS variant,\n    count() AS occurrences,\n    uniq(person_id) AS users\nFROM events\nWHERE event = '$exception'\n    AND (issue_id = '\u003Cissue_id>' OR properties.$exception_issue_id = '\u003Cissue_id>')\n    AND timestamp > now() - INTERVAL 14 DAY\nGROUP BY variant\nORDER BY occurrences DESC\n```\n\nCompare the variant split here to the project's overall exposure on the same\nflag in the same window. Disproportionate representation of one variant\nsuggests the flag is involved in the cause — not a guarantee, but a strong\nhypothesis.\n\n### Step 5 — Reconstruct what happened around the error\n\nUse the `$session_id` from the sample event in step 2 to pull the activity\nsurrounding the exception. Three sources stack on each other; run the ones\nthat make sense for the SDK that captured the error.\n\n#### 5a. Surrounding events (client SDKs by `$session_id`)\n\nMirrors the ET frontend session timeline. Pulls custom events, page views,\nand other exceptions captured under the same session within a ±1h window:\n\n```sql\nposthog:execute-sql\nSELECT\n    uuid,\n    event,\n    timestamp,\n    properties.$lib AS lib,\n    properties.$current_url AS url\nFROM events\nWHERE $session_id = '\u003Csession_id_from_step_2>'\n    AND (event = '$exception' OR event = '$pageview' OR left(event, 1) != '$')\n    AND timestamp >= toDateTime('\u003Cerror_timestamp>', 'UTC') - INTERVAL 1 HOUR\n    AND timestamp \u003C= toDateTime('\u003Cerror_timestamp>', 'UTC') + INTERVAL 1 HOUR\nORDER BY timestamp ASC\nLIMIT 100\n```\n\nThe `left(event, 1) != '$'` clause drops PostHog autocapture \u002F system events\nwhile keeping every custom event. The `OR event = '$pageview'`\u002F`'$exception'`\nexceptions re-add the two system events worth seeing on the timeline. This is\nthe same filter the ET UI uses.\n\nMixed `$lib` values in the output are a feature, not noise. When a server SDK\npropagates `$session_id` from the client request (PostHog's own backend does\nthis), the timeline shows server-side activity inline with the browser side —\n\"both SDKs when available\" for free. Skim the lib column to see how each row\nwas produced.\n\nThe skill defaults to a ±1h window because that's what the UI uses; widen it\nwhen an issue's actions are slow (long batch jobs, background workers) or\ntighten it when only the seconds right before the throw matter.\n\n#### 5b. Console logs (web \u002F React Native session replay)\n\nWhen session replay is enabled, the replay pipeline emits `console.*` calls\ninto the `log_entries` table tagged with the same session id. Pull them with\nthe matching window:\n\n```sql\nposthog:execute-sql\nSELECT timestamp, level, message\nFROM log_entries\nWHERE log_source = 'session_replay'\n    AND log_source_id = '\u003Csession_id_from_step_2>'\n    AND timestamp >= toDateTime('\u003Cerror_timestamp>', 'UTC') - INTERVAL 1 HOUR\n    AND timestamp \u003C= toDateTime('\u003Cerror_timestamp>', 'UTC') + INTERVAL 1 HOUR\nORDER BY timestamp ASC\nLIMIT 200\n```\n\n`log_source = 'session_replay'` is the discriminator — `log_entries` is shared\nwith other sources. Empty results are common: either replay isn't enabled, or\nthis specific session wasn't recorded. Mention that in the synthesis rather\nthan treating it as a failure.\n\n#### 5c. Server logs around the error (OTEL via `query-logs`)\n\nFor server-side exceptions, correlate the exception timestamp with OTEL log\nentries the customer ingests. Many projects don't ingest logs at all — if\n`query-logs` returns nothing or errors, say so and move on. Discover available\nservices first with `logs-attribute-values-list` when you don't know which\nservice produced the error.\n\n```json\nposthog:query-logs\n{\n  \"query\": {\n    \"dateRange\": {\n      \"date_from\": \"\u003Cerror_timestamp minus 5 minutes>\",\n      \"date_to\":   \"\u003Cerror_timestamp plus 5 minutes>\"\n    },\n    \"severityLevels\": [\"error\", \"warn\"],\n    \"serviceNames\": [\"\u003Cservice.name if known>\"],\n    \"limit\": 50,\n    \"orderBy\": \"earliest\"\n  }\n}\n```\n\nCaveats worth knowing before relying on this output:\n\n- Logs are ingested separately from events and typically have shorter retention.\n  Old exceptions may return empty even though the issue is still active.\n- `trace_id` \u002F `span_id` come back zero-padded (`\"00000000...\"`) when not set.\n  Trace-based correlation only works for explicitly instrumented requests, not\n  for every event.\n- `service.name` is a resource attribute. Narrow with `serviceNames` rather\n  than a free-text `searchTerm` when you know the producer.\n\n#### 5d. Find a representative replay\n\nHand off to `finding-replay-for-issue` when picking the _best_ session matters —\npopular issues link hundreds of recordings, mostly short crash fragments or\nidle-tab sessions, and that skill applies the duration \u002F active-time \u002F recency\nranking that finds the one most likely to show the cause. Hand off too when the\nuser asks for \"a replay\" without specifying which.\n\nSkip the hand-off and pull a recording inline via `query-session-recordings-list`\nwith `session_ids` from the sample exception events you already fetched in step 2\nwhen only a handful of sessions are linked, the user already named a specific\nsession, or any working example will do (e.g. proving the error reproduces).\n\nIf neither path returns a recording, mention that session replay may not be\nenabled for the affected users — useful context, not a failure.\n\n### Step 6 — Synthesize\n\nPresent in this order:\n\n1. **What it is** — type, message, where in the stack\n2. **Who it affects** — total users, sessions, and any segment breakdown that\n   stood out\n3. **When it started** — `first_seen`, plus the release \u002F version that\n   introduced it if a breakdown found one\n4. **Likely cause** — one or two hypotheses backed by the breakdowns above\n5. **Next step** — a concrete action: investigate the suspected release, watch\n   the linked replay, ping the assignee, or escalate\n\nKeep the synthesis tight. The user wants the answer, not a tour of the data.\n\n## Tips\n\n- The canonical join key from events to an issue is the resolved `issue_id`\n  virtual field, with `properties.$exception_issue_id` as fallback — see Step 3\n  for the reason.\n- For a \"what version introduced this?\" breakdown, prefer `$app_version` (the\n  user's deployed app version, auto-captured on iOS \u002F React Native and\n  manually set on web \u002F server) or `$exception_releases` when populated. Avoid\n  `$lib_version` for this question — it's the PostHog SDK library version, not\n  the user's app. See the \"Picking the right version property\" subsection in\n  Step 3.\n- If the issue spans more than 30 days, widen the date range explicitly.\n  Defaults often truncate the original `first_seen` event off the breakdown.\n- Don't propose a fix in the synthesis unless the cause is obvious from the\n  sample stack. Hypotheses backed by data are more useful than confident\n  guesses.\n- If `query-error-tracking-issue` returns an `external_issues` array, the issue\n  is already linked to a Linear \u002F Jira \u002F GitHub ticket. Mention the link in the\n  synthesis so the user doesn't open a duplicate.\n",{"data":47,"body":48},{"name":4,"description":6},{"type":49,"children":50},"root",[51,60,66,73,226,232,239,244,446,518,530,536,541,746,775,833,839,852,934,941,946,1073,1097,1153,1165,1293,1330,1380,1407,1434,1440,1445,1529,1632,1667,1753,1758,1764,1776,1788,1793,1909,1936,1956,1961,1967,1988,2063,2081,2094,2114,2440,2445,2507,2513,2533,2554,2559,2565,2570,2630,2635,2641,2726],{"type":52,"tag":53,"props":54,"children":56},"element","h1",{"id":55},"investigating-an-error-tracking-issue",[57],{"type":58,"value":59},"text","Investigating an error tracking issue",{"type":52,"tag":61,"props":62,"children":63},"p",{},[64],{"type":58,"value":65},"When a user asks \"what's going on with this error?\" or pastes an issue URL, gather\nthe context they would otherwise have to assemble manually: who is hitting it, what\nchanged, where it happens, and whether a replay shows the cause.",{"type":52,"tag":67,"props":68,"children":70},"h2",{"id":69},"available-tools",[71],{"type":58,"value":72},"Available tools",{"type":52,"tag":74,"props":75,"children":76},"table",{},[77,96],{"type":52,"tag":78,"props":79,"children":80},"thead",{},[81],{"type":52,"tag":82,"props":83,"children":84},"tr",{},[85,91],{"type":52,"tag":86,"props":87,"children":88},"th",{},[89],{"type":58,"value":90},"Tool",{"type":52,"tag":86,"props":92,"children":93},{},[94],{"type":58,"value":95},"Purpose",{"type":52,"tag":97,"props":98,"children":99},"tbody",{},[100,119,150,167,184,209],{"type":52,"tag":82,"props":101,"children":102},{},[103,114],{"type":52,"tag":104,"props":105,"children":106},"td",{},[107],{"type":52,"tag":108,"props":109,"children":111},"code",{"className":110},[],[112],{"type":58,"value":113},"posthog:query-error-tracking-issue",{"type":52,"tag":104,"props":115,"children":116},{},[117],{"type":58,"value":118},"Compact issue details (status, assignee, top frame, release, aggregates)",{"type":52,"tag":82,"props":120,"children":121},{},[122,131],{"type":52,"tag":104,"props":123,"children":124},{},[125],{"type":52,"tag":108,"props":126,"children":128},{"className":127},[],[129],{"type":58,"value":130},"posthog:query-error-tracking-issue-events",{"type":52,"tag":104,"props":132,"children":133},{},[134,136,142,144],{"type":58,"value":135},"Sampled ",{"type":52,"tag":108,"props":137,"children":139},{"className":138},[],[140],{"type":58,"value":141},"$exception",{"type":58,"value":143}," events with stack, URL, browser, ",{"type":52,"tag":108,"props":145,"children":147},{"className":146},[],[148],{"type":58,"value":149},"$session_id",{"type":52,"tag":82,"props":151,"children":152},{},[153,162],{"type":52,"tag":104,"props":154,"children":155},{},[156],{"type":52,"tag":108,"props":157,"children":159},{"className":158},[],[160],{"type":58,"value":161},"posthog:execute-sql",{"type":52,"tag":104,"props":163,"children":164},{},[165],{"type":58,"value":166},"Breakdowns, release \u002F flag correlations, surrounding events + console logs around the error",{"type":52,"tag":82,"props":168,"children":169},{},[170,179],{"type":52,"tag":104,"props":171,"children":172},{},[173],{"type":52,"tag":108,"props":174,"children":176},{"className":175},[],[177],{"type":58,"value":178},"posthog:query-logs",{"type":52,"tag":104,"props":180,"children":181},{},[182],{"type":58,"value":183},"OTEL log entries around the error timestamp for server-side issues",{"type":52,"tag":82,"props":185,"children":186},{},[187,196],{"type":52,"tag":104,"props":188,"children":189},{},[190],{"type":52,"tag":108,"props":191,"children":193},{"className":192},[],[194],{"type":58,"value":195},"posthog:query-session-recordings-list",{"type":52,"tag":104,"props":197,"children":198},{},[199,201,207],{"type":58,"value":200},"Linked replays (delegate ranking to ",{"type":52,"tag":108,"props":202,"children":204},{"className":203},[],[205],{"type":58,"value":206},"finding-replay-for-issue",{"type":58,"value":208},")",{"type":52,"tag":82,"props":210,"children":211},{},[212,221],{"type":52,"tag":104,"props":213,"children":214},{},[215],{"type":52,"tag":108,"props":216,"children":218},{"className":217},[],[219],{"type":58,"value":220},"posthog:read-data-schema",{"type":52,"tag":104,"props":222,"children":223},{},[224],{"type":58,"value":225},"Confirm property keys before filtering on them",{"type":52,"tag":67,"props":227,"children":229},{"id":228},"workflow",[230],{"type":58,"value":231},"Workflow",{"type":52,"tag":233,"props":234,"children":236},"h3",{"id":235},"step-1-establish-the-issue-baseline",[237],{"type":58,"value":238},"Step 1 — Establish the issue baseline",{"type":52,"tag":61,"props":240,"children":241},{},[242],{"type":58,"value":243},"Fetch the issue record with its compact aggregates and a sparkline:",{"type":52,"tag":245,"props":246,"children":251},"pre",{"className":247,"code":248,"language":249,"meta":250,"style":250},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","posthog:query-error-tracking-issue\n{\n  \"issueId\": \"\u003Cissue_id>\",\n  \"dateRange\": { \"date_from\": \"-30d\" },\n  \"includeSparkline\": true,\n  \"volumeResolution\": 12\n}\n","json","",[252],{"type":52,"tag":108,"props":253,"children":254},{"__ignoreMap":250},[255,267,277,322,384,410,437],{"type":52,"tag":256,"props":257,"children":260},"span",{"class":258,"line":259},"line",1,[261],{"type":52,"tag":256,"props":262,"children":264},{"style":263},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[265],{"type":58,"value":266},"posthog:query-error-tracking-issue\n",{"type":52,"tag":256,"props":268,"children":270},{"class":258,"line":269},2,[271],{"type":52,"tag":256,"props":272,"children":274},{"style":273},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[275],{"type":58,"value":276},"{\n",{"type":52,"tag":256,"props":278,"children":280},{"class":258,"line":279},3,[281,286,292,297,302,307,313,317],{"type":52,"tag":256,"props":282,"children":283},{"style":273},[284],{"type":58,"value":285},"  \"",{"type":52,"tag":256,"props":287,"children":289},{"style":288},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[290],{"type":58,"value":291},"issueId",{"type":52,"tag":256,"props":293,"children":294},{"style":273},[295],{"type":58,"value":296},"\"",{"type":52,"tag":256,"props":298,"children":299},{"style":273},[300],{"type":58,"value":301},":",{"type":52,"tag":256,"props":303,"children":304},{"style":273},[305],{"type":58,"value":306}," \"",{"type":52,"tag":256,"props":308,"children":310},{"style":309},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[311],{"type":58,"value":312},"\u003Cissue_id>",{"type":52,"tag":256,"props":314,"children":315},{"style":273},[316],{"type":58,"value":296},{"type":52,"tag":256,"props":318,"children":319},{"style":273},[320],{"type":58,"value":321},",\n",{"type":52,"tag":256,"props":323,"children":325},{"class":258,"line":324},4,[326,330,335,339,343,348,352,358,362,366,370,375,379],{"type":52,"tag":256,"props":327,"children":328},{"style":273},[329],{"type":58,"value":285},{"type":52,"tag":256,"props":331,"children":332},{"style":288},[333],{"type":58,"value":334},"dateRange",{"type":52,"tag":256,"props":336,"children":337},{"style":273},[338],{"type":58,"value":296},{"type":52,"tag":256,"props":340,"children":341},{"style":273},[342],{"type":58,"value":301},{"type":52,"tag":256,"props":344,"children":345},{"style":273},[346],{"type":58,"value":347}," {",{"type":52,"tag":256,"props":349,"children":350},{"style":273},[351],{"type":58,"value":306},{"type":52,"tag":256,"props":353,"children":355},{"style":354},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[356],{"type":58,"value":357},"date_from",{"type":52,"tag":256,"props":359,"children":360},{"style":273},[361],{"type":58,"value":296},{"type":52,"tag":256,"props":363,"children":364},{"style":273},[365],{"type":58,"value":301},{"type":52,"tag":256,"props":367,"children":368},{"style":273},[369],{"type":58,"value":306},{"type":52,"tag":256,"props":371,"children":372},{"style":309},[373],{"type":58,"value":374},"-30d",{"type":52,"tag":256,"props":376,"children":377},{"style":273},[378],{"type":58,"value":296},{"type":52,"tag":256,"props":380,"children":381},{"style":273},[382],{"type":58,"value":383}," },\n",{"type":52,"tag":256,"props":385,"children":387},{"class":258,"line":386},5,[388,392,397,401,405],{"type":52,"tag":256,"props":389,"children":390},{"style":273},[391],{"type":58,"value":285},{"type":52,"tag":256,"props":393,"children":394},{"style":288},[395],{"type":58,"value":396},"includeSparkline",{"type":52,"tag":256,"props":398,"children":399},{"style":273},[400],{"type":58,"value":296},{"type":52,"tag":256,"props":402,"children":403},{"style":273},[404],{"type":58,"value":301},{"type":52,"tag":256,"props":406,"children":407},{"style":273},[408],{"type":58,"value":409}," true,\n",{"type":52,"tag":256,"props":411,"children":413},{"class":258,"line":412},6,[414,418,423,427,431],{"type":52,"tag":256,"props":415,"children":416},{"style":273},[417],{"type":58,"value":285},{"type":52,"tag":256,"props":419,"children":420},{"style":288},[421],{"type":58,"value":422},"volumeResolution",{"type":52,"tag":256,"props":424,"children":425},{"style":273},[426],{"type":58,"value":296},{"type":52,"tag":256,"props":428,"children":429},{"style":273},[430],{"type":58,"value":301},{"type":52,"tag":256,"props":432,"children":434},{"style":433},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[435],{"type":58,"value":436}," 12\n",{"type":52,"tag":256,"props":438,"children":440},{"class":258,"line":439},7,[441],{"type":52,"tag":256,"props":442,"children":443},{"style":273},[444],{"type":58,"value":445},"}\n",{"type":52,"tag":61,"props":447,"children":448},{},[449,451,457,459,465,466,472,473,479,480,486,487,493,495,501,503,509,510,516],{"type":58,"value":450},"Capture: ",{"type":52,"tag":108,"props":452,"children":454},{"className":453},[],[455],{"type":58,"value":456},"name",{"type":58,"value":458},", ",{"type":52,"tag":108,"props":460,"children":462},{"className":461},[],[463],{"type":58,"value":464},"description",{"type":58,"value":458},{"type":52,"tag":108,"props":467,"children":469},{"className":468},[],[470],{"type":58,"value":471},"status",{"type":58,"value":458},{"type":52,"tag":108,"props":474,"children":476},{"className":475},[],[477],{"type":58,"value":478},"first_seen",{"type":58,"value":458},{"type":52,"tag":108,"props":481,"children":483},{"className":482},[],[484],{"type":58,"value":485},"last_seen",{"type":58,"value":458},{"type":52,"tag":108,"props":488,"children":490},{"className":489},[],[491],{"type":58,"value":492},"assignee",{"type":58,"value":494},",\ntotal ",{"type":52,"tag":108,"props":496,"children":498},{"className":497},[],[499],{"type":58,"value":500},"occurrences",{"type":58,"value":502}," \u002F ",{"type":52,"tag":108,"props":504,"children":506},{"className":505},[],[507],{"type":58,"value":508},"users",{"type":58,"value":502},{"type":52,"tag":108,"props":511,"children":513},{"className":512},[],[514],{"type":58,"value":515},"sessions",{"type":58,"value":517},", top in-app frame, latest release\nmetadata, and the volume buckets.",{"type":52,"tag":61,"props":519,"children":520},{},[521,523,528],{"type":58,"value":522},"The sparkline tells you the shape — flat, spike, ramp, or recurring — and that\nshape drives the rest of the investigation. If the user only asked a status\nquestion, skip ",{"type":52,"tag":108,"props":524,"children":526},{"className":525},[],[527],{"type":58,"value":396},{"type":58,"value":529}," to save tokens.",{"type":52,"tag":233,"props":531,"children":533},{"id":532},"step-2-pull-a-sample-exception-event",[534],{"type":58,"value":535},"Step 2 — Pull a sample exception event",{"type":52,"tag":61,"props":537,"children":538},{},[539],{"type":58,"value":540},"A captured event has the stack frames, URL, browser, and properties needed to\nreason about cause. Pull a recent sample first, then an early one to compare.",{"type":52,"tag":245,"props":542,"children":544},{"className":247,"code":543,"language":249,"meta":250,"style":250},"posthog:query-error-tracking-issue-events\n{\n  \"issueId\": \"\u003Cissue_id>\",\n  \"limit\": 1,\n  \"include\": [\"exception\", \"stacktrace\", \"environment\", \"navigation\", \"correlation\"]\n}\n",[545],{"type":52,"tag":108,"props":546,"children":547},{"__ignoreMap":250},[548,556,563,598,627,739],{"type":52,"tag":256,"props":549,"children":550},{"class":258,"line":259},[551],{"type":52,"tag":256,"props":552,"children":553},{"style":263},[554],{"type":58,"value":555},"posthog:query-error-tracking-issue-events\n",{"type":52,"tag":256,"props":557,"children":558},{"class":258,"line":269},[559],{"type":52,"tag":256,"props":560,"children":561},{"style":273},[562],{"type":58,"value":276},{"type":52,"tag":256,"props":564,"children":565},{"class":258,"line":279},[566,570,574,578,582,586,590,594],{"type":52,"tag":256,"props":567,"children":568},{"style":273},[569],{"type":58,"value":285},{"type":52,"tag":256,"props":571,"children":572},{"style":288},[573],{"type":58,"value":291},{"type":52,"tag":256,"props":575,"children":576},{"style":273},[577],{"type":58,"value":296},{"type":52,"tag":256,"props":579,"children":580},{"style":273},[581],{"type":58,"value":301},{"type":52,"tag":256,"props":583,"children":584},{"style":273},[585],{"type":58,"value":306},{"type":52,"tag":256,"props":587,"children":588},{"style":309},[589],{"type":58,"value":312},{"type":52,"tag":256,"props":591,"children":592},{"style":273},[593],{"type":58,"value":296},{"type":52,"tag":256,"props":595,"children":596},{"style":273},[597],{"type":58,"value":321},{"type":52,"tag":256,"props":599,"children":600},{"class":258,"line":324},[601,605,610,614,618,623],{"type":52,"tag":256,"props":602,"children":603},{"style":273},[604],{"type":58,"value":285},{"type":52,"tag":256,"props":606,"children":607},{"style":288},[608],{"type":58,"value":609},"limit",{"type":52,"tag":256,"props":611,"children":612},{"style":273},[613],{"type":58,"value":296},{"type":52,"tag":256,"props":615,"children":616},{"style":273},[617],{"type":58,"value":301},{"type":52,"tag":256,"props":619,"children":620},{"style":433},[621],{"type":58,"value":622}," 1",{"type":52,"tag":256,"props":624,"children":625},{"style":273},[626],{"type":58,"value":321},{"type":52,"tag":256,"props":628,"children":629},{"class":258,"line":386},[630,634,639,643,647,652,656,661,665,670,674,679,683,687,691,696,700,704,708,713,717,721,725,730,734],{"type":52,"tag":256,"props":631,"children":632},{"style":273},[633],{"type":58,"value":285},{"type":52,"tag":256,"props":635,"children":636},{"style":288},[637],{"type":58,"value":638},"include",{"type":52,"tag":256,"props":640,"children":641},{"style":273},[642],{"type":58,"value":296},{"type":52,"tag":256,"props":644,"children":645},{"style":273},[646],{"type":58,"value":301},{"type":52,"tag":256,"props":648,"children":649},{"style":273},[650],{"type":58,"value":651}," [",{"type":52,"tag":256,"props":653,"children":654},{"style":273},[655],{"type":58,"value":296},{"type":52,"tag":256,"props":657,"children":658},{"style":309},[659],{"type":58,"value":660},"exception",{"type":52,"tag":256,"props":662,"children":663},{"style":273},[664],{"type":58,"value":296},{"type":52,"tag":256,"props":666,"children":667},{"style":273},[668],{"type":58,"value":669},",",{"type":52,"tag":256,"props":671,"children":672},{"style":273},[673],{"type":58,"value":306},{"type":52,"tag":256,"props":675,"children":676},{"style":309},[677],{"type":58,"value":678},"stacktrace",{"type":52,"tag":256,"props":680,"children":681},{"style":273},[682],{"type":58,"value":296},{"type":52,"tag":256,"props":684,"children":685},{"style":273},[686],{"type":58,"value":669},{"type":52,"tag":256,"props":688,"children":689},{"style":273},[690],{"type":58,"value":306},{"type":52,"tag":256,"props":692,"children":693},{"style":309},[694],{"type":58,"value":695},"environment",{"type":52,"tag":256,"props":697,"children":698},{"style":273},[699],{"type":58,"value":296},{"type":52,"tag":256,"props":701,"children":702},{"style":273},[703],{"type":58,"value":669},{"type":52,"tag":256,"props":705,"children":706},{"style":273},[707],{"type":58,"value":306},{"type":52,"tag":256,"props":709,"children":710},{"style":309},[711],{"type":58,"value":712},"navigation",{"type":52,"tag":256,"props":714,"children":715},{"style":273},[716],{"type":58,"value":296},{"type":52,"tag":256,"props":718,"children":719},{"style":273},[720],{"type":58,"value":669},{"type":52,"tag":256,"props":722,"children":723},{"style":273},[724],{"type":58,"value":306},{"type":52,"tag":256,"props":726,"children":727},{"style":309},[728],{"type":58,"value":729},"correlation",{"type":52,"tag":256,"props":731,"children":732},{"style":273},[733],{"type":58,"value":296},{"type":52,"tag":256,"props":735,"children":736},{"style":273},[737],{"type":58,"value":738},"]\n",{"type":52,"tag":256,"props":740,"children":741},{"class":258,"line":412},[742],{"type":52,"tag":256,"props":743,"children":744},{"style":273},[745],{"type":58,"value":445},{"type":52,"tag":61,"props":747,"children":748},{},[749,751,757,759,765,767,773],{"type":58,"value":750},"The tool defaults to ",{"type":52,"tag":108,"props":752,"children":754},{"className":753},[],[755],{"type":58,"value":756},"onlyAppFrames: true",{"type":58,"value":758},", which strips vendor frames; flip to ",{"type":52,"tag":108,"props":760,"children":762},{"className":761},[],[763],{"type":58,"value":764},"false",{"type":58,"value":766},"\nwhen the bug appears to live in a third-party library — or when the response\ncomes back with ",{"type":52,"tag":108,"props":768,"children":770},{"className":769},[],[771],{"type":58,"value":772},"stacktrace.type: \"resolved\"",{"type":58,"value":774}," but no frames at all (common for\nminified bundles where every frame looks vendor-y to the resolver, e.g. React\nproduction builds).",{"type":52,"tag":61,"props":776,"children":777},{},[778,780,785,787,792,794,799,801,807,809,815,817,823,825,831],{"type":58,"value":779},"For the earliest sample, narrow ",{"type":52,"tag":108,"props":781,"children":783},{"className":782},[],[784],{"type":58,"value":334},{"type":58,"value":786}," to a tight window around the\nissue's ",{"type":52,"tag":108,"props":788,"children":790},{"className":789},[],[791],{"type":58,"value":478},{"type":58,"value":793}," (e.g. set ",{"type":52,"tag":108,"props":795,"children":797},{"className":796},[],[798],{"type":58,"value":357},{"type":58,"value":800}," slightly before and ",{"type":52,"tag":108,"props":802,"children":804},{"className":803},[],[805],{"type":58,"value":806},"date_to",{"type":58,"value":808},"\nslightly after) and pass ",{"type":52,"tag":108,"props":810,"children":812},{"className":811},[],[813],{"type":58,"value":814},"orderDirection: \"ASC\"",{"type":58,"value":816}," so you get the earliest\nevent in the window rather than the latest — the tool defaults to ",{"type":52,"tag":108,"props":818,"children":820},{"className":819},[],[821],{"type":58,"value":822},"DESC",{"type":58,"value":824},",\nwhich would return a recent event and silently duplicate the first call.\nIf recent and earliest events look materially different — different stack\nroot, different URL pattern — the issue may be a grouping mistake. Flag for\n",{"type":52,"tag":108,"props":826,"children":828},{"className":827},[],[829],{"type":58,"value":830},"grouping-noisy-errors",{"type":58,"value":832}," instead of continuing as if it were one bug.",{"type":52,"tag":233,"props":834,"children":836},{"id":835},"step-3-run-breakdowns-to-isolate-the-cause",[837],{"type":58,"value":838},"Step 3 — Run breakdowns to isolate the cause",{"type":52,"tag":61,"props":840,"children":841},{},[842,844,850],{"type":58,"value":843},"Breakdowns aren't a typed tool — drop into ",{"type":52,"tag":108,"props":845,"children":847},{"className":846},[],[848],{"type":58,"value":849},"execute-sql",{"type":58,"value":851},". Run only the\nbreakdowns the issue's shape suggests; each one costs a query and clutters the\nsynthesis.",{"type":52,"tag":74,"props":853,"children":854},{},[855,871],{"type":52,"tag":78,"props":856,"children":857},{},[858],{"type":52,"tag":82,"props":859,"children":860},{},[861,866],{"type":52,"tag":86,"props":862,"children":863},{},[864],{"type":58,"value":865},"Sparkline shape",{"type":52,"tag":86,"props":867,"children":868},{},[869],{"type":58,"value":870},"First breakdown to try",{"type":52,"tag":97,"props":872,"children":873},{},[874,887,900,913],{"type":52,"tag":82,"props":875,"children":876},{},[877,882],{"type":52,"tag":104,"props":878,"children":879},{},[880],{"type":58,"value":881},"Spike from zero",{"type":52,"tag":104,"props":883,"children":884},{},[885],{"type":58,"value":886},"By app version \u002F release — almost always a deploy regression (see below)",{"type":52,"tag":82,"props":888,"children":889},{},[890,895],{"type":52,"tag":104,"props":891,"children":892},{},[893],{"type":58,"value":894},"Steady-state high",{"type":52,"tag":104,"props":896,"children":897},{},[898],{"type":58,"value":899},"By browser \u002F OS — rendering or platform-specific bug",{"type":52,"tag":82,"props":901,"children":902},{},[903,908],{"type":52,"tag":104,"props":904,"children":905},{},[906],{"type":58,"value":907},"Ramp",{"type":52,"tag":104,"props":909,"children":910},{},[911],{"type":58,"value":912},"By geography or feature flag — gradual rollout exposure",{"type":52,"tag":82,"props":914,"children":915},{},[916,921],{"type":52,"tag":104,"props":917,"children":918},{},[919],{"type":58,"value":920},"Bursts then quiet",{"type":52,"tag":104,"props":922,"children":923},{},[924,926,932],{"type":58,"value":925},"By time of day or ",{"type":52,"tag":108,"props":927,"children":929},{"className":928},[],[930],{"type":58,"value":931},"$current_url",{"type":58,"value":933}," — scheduled job or specific page",{"type":52,"tag":935,"props":936,"children":938},"h4",{"id":937},"picking-the-right-version-property",[939],{"type":58,"value":940},"Picking the right version property",{"type":52,"tag":61,"props":942,"children":943},{},[944],{"type":58,"value":945},"PostHog emits three version-shaped fields. They mean different things and only\none of them answers \"what version of the user's app introduced this?\":",{"type":52,"tag":74,"props":947,"children":948},{},[949,975],{"type":52,"tag":78,"props":950,"children":951},{},[952],{"type":52,"tag":82,"props":953,"children":954},{},[955,960,965,970],{"type":52,"tag":86,"props":956,"children":957},{},[958],{"type":58,"value":959},"Property",{"type":52,"tag":86,"props":961,"children":962},{},[963],{"type":58,"value":964},"What it is",{"type":52,"tag":86,"props":966,"children":967},{},[968],{"type":58,"value":969},"Auto-captured by",{"type":52,"tag":86,"props":971,"children":972},{},[973],{"type":58,"value":974},"Use for",{"type":52,"tag":97,"props":976,"children":977},{},[978,1011,1046],{"type":52,"tag":82,"props":979,"children":980},{},[981,990,995,1000],{"type":52,"tag":104,"props":982,"children":983},{},[984],{"type":52,"tag":108,"props":985,"children":987},{"className":986},[],[988],{"type":58,"value":989},"$exception_releases",{"type":52,"tag":104,"props":991,"children":992},{},[993],{"type":58,"value":994},"Cymbal-managed release map, keyed by release ID",{"type":52,"tag":104,"props":996,"children":997},{},[998],{"type":58,"value":999},"Only when SDK publishes release metadata (e.g. sourcemap upload tied to a release)",{"type":52,"tag":104,"props":1001,"children":1002},{},[1003,1005],{"type":58,"value":1004},"Most precise release attribution ",{"type":52,"tag":1006,"props":1007,"children":1008},"strong",{},[1009],{"type":58,"value":1010},"when present",{"type":52,"tag":82,"props":1012,"children":1013},{},[1014,1023,1028,1041],{"type":52,"tag":104,"props":1015,"children":1016},{},[1017],{"type":52,"tag":108,"props":1018,"children":1020},{"className":1019},[],[1021],{"type":58,"value":1022},"$app_version",{"type":52,"tag":104,"props":1024,"children":1025},{},[1026],{"type":58,"value":1027},"The user's deployed app version",{"type":52,"tag":104,"props":1029,"children":1030},{},[1031,1033,1039],{"type":58,"value":1032},"iOS (",{"type":52,"tag":108,"props":1034,"children":1036},{"className":1035},[],[1037],{"type":58,"value":1038},"CFBundleShortVersionString",{"type":58,"value":1040},"), React Native (Expo \u002F react-native-device-info)",{"type":52,"tag":104,"props":1042,"children":1043},{},[1044],{"type":58,"value":1045},"\"What deploy of my app introduced this?\" — the question users care about",{"type":52,"tag":82,"props":1047,"children":1048},{},[1049,1058,1063,1068],{"type":52,"tag":104,"props":1050,"children":1051},{},[1052],{"type":52,"tag":108,"props":1053,"children":1055},{"className":1054},[],[1056],{"type":58,"value":1057},"$lib_version",{"type":52,"tag":104,"props":1059,"children":1060},{},[1061],{"type":58,"value":1062},"The PostHog SDK library version (e.g. posthog-js 1.298.0)",{"type":52,"tag":104,"props":1064,"children":1065},{},[1066],{"type":58,"value":1067},"Every SDK on every event",{"type":52,"tag":104,"props":1069,"children":1070},{},[1071],{"type":58,"value":1072},"The narrow \"did upgrading the PostHog SDK introduce this?\" question",{"type":52,"tag":61,"props":1074,"children":1075},{},[1076,1081,1083,1088,1090,1095],{"type":52,"tag":108,"props":1077,"children":1079},{"className":1078},[],[1080],{"type":58,"value":1057},{"type":58,"value":1082}," is on virtually every event, which makes it tempting — but it's\nthe PostHog library version, not the user's app version. A constant\n",{"type":52,"tag":108,"props":1084,"children":1086},{"className":1085},[],[1087],{"type":58,"value":1057},{"type":58,"value":1089}," paired with a spike means the user shipped a regression in\ntheir own code with the SDK unchanged, which is the common case. Reach for\n",{"type":52,"tag":108,"props":1091,"children":1093},{"className":1092},[],[1094],{"type":58,"value":1057},{"type":58,"value":1096}," only when nothing else is populated and you're explicitly\nasking \"did upgrading PostHog cause this?\".",{"type":52,"tag":61,"props":1098,"children":1099},{},[1100,1102,1107,1109,1114,1116,1122,1124,1130,1132,1137,1139,1144,1146,1151],{"type":58,"value":1101},"Web \u002F server \u002F Node \u002F Java \u002F Python projects do ",{"type":52,"tag":1006,"props":1103,"children":1104},{},[1105],{"type":58,"value":1106},"not",{"type":58,"value":1108}," auto-capture\n",{"type":52,"tag":108,"props":1110,"children":1112},{"className":1111},[],[1113],{"type":58,"value":1022},{"type":58,"value":1115}," — the customer has to set it (via ",{"type":52,"tag":108,"props":1117,"children":1119},{"className":1118},[],[1120],{"type":58,"value":1121},"register",{"type":58,"value":1123},", a context\nprovider, or ",{"type":52,"tag":108,"props":1125,"children":1127},{"className":1126},[],[1128],{"type":58,"value":1129},"before_send",{"type":58,"value":1131},"). If the breakdown comes back with one\n",{"type":52,"tag":108,"props":1133,"children":1135},{"className":1134},[],[1136],{"type":58,"value":1022},{"type":58,"value":1138}," row of all-NULL, say so explicitly in the synthesis and\nsuggest the customer wire it up; falling back to ",{"type":52,"tag":108,"props":1140,"children":1142},{"className":1141},[],[1143],{"type":58,"value":989},{"type":58,"value":1145}," or to\na per-day timeline by ",{"type":52,"tag":108,"props":1147,"children":1149},{"className":1148},[],[1150],{"type":58,"value":478},{"type":58,"value":1152}," keeps the investigation moving.",{"type":52,"tag":61,"props":1154,"children":1155},{},[1156,1158,1163],{"type":58,"value":1157},"Example (",{"type":52,"tag":108,"props":1159,"children":1161},{"className":1160},[],[1162],{"type":58,"value":1022},{"type":58,"value":1164}," — populated automatically on mobile, manually on\nweb \u002F server):",{"type":52,"tag":245,"props":1166,"children":1170},{"className":1167,"code":1168,"language":1169,"meta":250,"style":250},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","posthog:execute-sql\nSELECT\n    properties.$app_version AS app_version,\n    count() AS occurrences,\n    uniq(person_id) AS users,\n    min(timestamp) AS first_seen,\n    max(timestamp) AS last_seen\nFROM events\nWHERE event = '$exception'\n    AND (issue_id = '\u003Cissue_id>' OR properties.$exception_issue_id = '\u003Cissue_id>')\n    AND timestamp > now() - INTERVAL 30 DAY\nGROUP BY app_version\nORDER BY occurrences DESC\nLIMIT 20\n","sql",[1171],{"type":52,"tag":108,"props":1172,"children":1173},{"__ignoreMap":250},[1174,1182,1190,1198,1206,1214,1222,1230,1239,1248,1257,1266,1275,1284],{"type":52,"tag":256,"props":1175,"children":1176},{"class":258,"line":259},[1177],{"type":52,"tag":256,"props":1178,"children":1179},{},[1180],{"type":58,"value":1181},"posthog:execute-sql\n",{"type":52,"tag":256,"props":1183,"children":1184},{"class":258,"line":269},[1185],{"type":52,"tag":256,"props":1186,"children":1187},{},[1188],{"type":58,"value":1189},"SELECT\n",{"type":52,"tag":256,"props":1191,"children":1192},{"class":258,"line":279},[1193],{"type":52,"tag":256,"props":1194,"children":1195},{},[1196],{"type":58,"value":1197},"    properties.$app_version AS app_version,\n",{"type":52,"tag":256,"props":1199,"children":1200},{"class":258,"line":324},[1201],{"type":52,"tag":256,"props":1202,"children":1203},{},[1204],{"type":58,"value":1205},"    count() AS occurrences,\n",{"type":52,"tag":256,"props":1207,"children":1208},{"class":258,"line":386},[1209],{"type":52,"tag":256,"props":1210,"children":1211},{},[1212],{"type":58,"value":1213},"    uniq(person_id) AS users,\n",{"type":52,"tag":256,"props":1215,"children":1216},{"class":258,"line":412},[1217],{"type":52,"tag":256,"props":1218,"children":1219},{},[1220],{"type":58,"value":1221},"    min(timestamp) AS first_seen,\n",{"type":52,"tag":256,"props":1223,"children":1224},{"class":258,"line":439},[1225],{"type":52,"tag":256,"props":1226,"children":1227},{},[1228],{"type":58,"value":1229},"    max(timestamp) AS last_seen\n",{"type":52,"tag":256,"props":1231,"children":1233},{"class":258,"line":1232},8,[1234],{"type":52,"tag":256,"props":1235,"children":1236},{},[1237],{"type":58,"value":1238},"FROM events\n",{"type":52,"tag":256,"props":1240,"children":1242},{"class":258,"line":1241},9,[1243],{"type":52,"tag":256,"props":1244,"children":1245},{},[1246],{"type":58,"value":1247},"WHERE event = '$exception'\n",{"type":52,"tag":256,"props":1249,"children":1251},{"class":258,"line":1250},10,[1252],{"type":52,"tag":256,"props":1253,"children":1254},{},[1255],{"type":58,"value":1256},"    AND (issue_id = '\u003Cissue_id>' OR properties.$exception_issue_id = '\u003Cissue_id>')\n",{"type":52,"tag":256,"props":1258,"children":1260},{"class":258,"line":1259},11,[1261],{"type":52,"tag":256,"props":1262,"children":1263},{},[1264],{"type":58,"value":1265},"    AND timestamp > now() - INTERVAL 30 DAY\n",{"type":52,"tag":256,"props":1267,"children":1269},{"class":258,"line":1268},12,[1270],{"type":52,"tag":256,"props":1271,"children":1272},{},[1273],{"type":58,"value":1274},"GROUP BY app_version\n",{"type":52,"tag":256,"props":1276,"children":1278},{"class":258,"line":1277},13,[1279],{"type":52,"tag":256,"props":1280,"children":1281},{},[1282],{"type":58,"value":1283},"ORDER BY occurrences DESC\n",{"type":52,"tag":256,"props":1285,"children":1287},{"class":258,"line":1286},14,[1288],{"type":52,"tag":256,"props":1289,"children":1290},{},[1291],{"type":58,"value":1292},"LIMIT 20\n",{"type":52,"tag":61,"props":1294,"children":1295},{},[1296,1298,1304,1306,1312,1314,1320,1322,1328],{"type":58,"value":1297},"The ",{"type":52,"tag":108,"props":1299,"children":1301},{"className":1300},[],[1302],{"type":58,"value":1303},"(issue_id = ... OR properties.$exception_issue_id = ...)",{"type":58,"value":1305}," pattern\ncovers both ways an event links to its issue. ",{"type":52,"tag":108,"props":1307,"children":1309},{"className":1308},[],[1310],{"type":58,"value":1311},"issue_id",{"type":58,"value":1313}," is the\nresolved virtual field on ",{"type":52,"tag":108,"props":1315,"children":1317},{"className":1316},[],[1318],{"type":58,"value":1319},"events",{"type":58,"value":1321}," (it follows fingerprint overrides so\nmerged\u002Fsplit issues route correctly); ",{"type":52,"tag":108,"props":1323,"children":1325},{"className":1324},[],[1326],{"type":58,"value":1327},"properties.$exception_issue_id",{"type":58,"value":1329}," is\nthe raw event property captured at ingestion. Filtering on only the property\nsilently undercounts events for issues that have been merged or split.",{"type":52,"tag":61,"props":1331,"children":1332},{},[1333,1335,1340,1342,1348,1350,1355,1357,1363,1365,1370,1372,1378],{"type":58,"value":1334},"If ",{"type":52,"tag":108,"props":1336,"children":1338},{"className":1337},[],[1339],{"type":58,"value":478},{"type":58,"value":1341}," for one ",{"type":52,"tag":108,"props":1343,"children":1345},{"className":1344},[],[1346],{"type":58,"value":1347},"app_version",{"type":58,"value":1349}," is much later than the issue's overall\n",{"type":52,"tag":108,"props":1351,"children":1353},{"className":1352},[],[1354],{"type":58,"value":478},{"type":58,"value":1356},", that release introduced or worsened the bug — strong root-cause\nsignal. If every row is ",{"type":52,"tag":108,"props":1358,"children":1360},{"className":1359},[],[1361],{"type":58,"value":1362},"NULL",{"type":58,"value":1364},", the SDK isn't reporting an app version on\nthis project (common on web \u002F server) — switch to ",{"type":52,"tag":108,"props":1366,"children":1368},{"className":1367},[],[1369],{"type":58,"value":989},{"type":58,"value":1371}," if\nthe customer ships releases, or fall back to a ",{"type":52,"tag":108,"props":1373,"children":1375},{"className":1374},[],[1376],{"type":58,"value":1377},"toDate(timestamp)",{"type":58,"value":1379}," timeline.",{"type":52,"tag":61,"props":1381,"children":1382},{},[1383,1385,1390,1392,1398,1400,1405],{"type":58,"value":1384},"When ",{"type":52,"tag":108,"props":1386,"children":1388},{"className":1387},[],[1389],{"type":58,"value":989},{"type":58,"value":1391}," is populated, it's a JSON dict keyed by release\nID. There is no top-level ",{"type":52,"tag":108,"props":1393,"children":1395},{"className":1394},[],[1396],{"type":58,"value":1397},"$release",{"type":58,"value":1399}," property; query ",{"type":52,"tag":108,"props":1401,"children":1403},{"className":1402},[],[1404],{"type":58,"value":989},{"type":58,"value":1406},"\ndirectly when you need release attribution and the customer has it wired up.",{"type":52,"tag":61,"props":1408,"children":1409},{},[1410,1412,1418,1419,1425,1426,1432],{"type":58,"value":1411},"Repeat with ",{"type":52,"tag":108,"props":1413,"children":1415},{"className":1414},[],[1416],{"type":58,"value":1417},"properties.$browser",{"type":58,"value":458},{"type":52,"tag":108,"props":1420,"children":1422},{"className":1421},[],[1423],{"type":58,"value":1424},"properties.$os",{"type":58,"value":458},{"type":52,"tag":108,"props":1427,"children":1429},{"className":1428},[],[1430],{"type":58,"value":1431},"properties.$current_url",{"type":58,"value":1433},",\nor any feature flag the project tags errors with.",{"type":52,"tag":233,"props":1435,"children":1437},{"id":1436},"step-4-check-feature-flag-exposure",[1438],{"type":58,"value":1439},"Step 4 — Check feature flag exposure",{"type":52,"tag":61,"props":1441,"children":1442},{},[1443],{"type":58,"value":1444},"If the user suspects an experiment or rollout, check whether affected users had\na flag enabled when the error fired.",{"type":52,"tag":61,"props":1446,"children":1447},{},[1448,1450,1456,1458,1464,1466,1472,1474,1480,1482,1488,1490,1495,1497,1503,1505,1511,1513,1519,1521,1527],{"type":58,"value":1449},"To enumerate which flags were evaluated on affected users, parse the\n",{"type":52,"tag":108,"props":1451,"children":1453},{"className":1452},[],[1454],{"type":58,"value":1455},"$active_feature_flags",{"type":58,"value":1457}," property — it is materialized as a ",{"type":52,"tag":108,"props":1459,"children":1461},{"className":1460},[],[1462],{"type":58,"value":1463},"Nullable(String)",{"type":58,"value":1465},"\nJSON-encoded column in ClickHouse, so ",{"type":52,"tag":108,"props":1467,"children":1469},{"className":1468},[],[1470],{"type":58,"value":1471},"arrayJoin(properties.$active_feature_flags)",{"type":58,"value":1473},"\ndirectly will fail. ",{"type":52,"tag":108,"props":1475,"children":1477},{"className":1476},[],[1478],{"type":58,"value":1479},"JSONExtract",{"type":58,"value":1481}," is the working pattern, but you must coerce the\nargument to a non-nullable String first: ClickHouse refuses to return a nested\n",{"type":52,"tag":108,"props":1483,"children":1485},{"className":1484},[],[1486],{"type":58,"value":1487},"Array(String)",{"type":58,"value":1489}," from ",{"type":52,"tag":108,"props":1491,"children":1493},{"className":1492},[],[1494],{"type":58,"value":1479},{"type":58,"value":1496}," when the input is ",{"type":52,"tag":108,"props":1498,"children":1500},{"className":1499},[],[1501],{"type":58,"value":1502},"Nullable",{"type":58,"value":1504},", and this type\nerror is raised at query planning, so the ",{"type":52,"tag":108,"props":1506,"children":1508},{"className":1507},[],[1509],{"type":58,"value":1510},"notEmpty(...)",{"type":58,"value":1512}," guard in the WHERE\nclause does not prevent it. Wrap the argument in ",{"type":52,"tag":108,"props":1514,"children":1516},{"className":1515},[],[1517],{"type":58,"value":1518},"ifNull(..., '[]')",{"type":58,"value":1520}," (or\n",{"type":52,"tag":108,"props":1522,"children":1524},{"className":1523},[],[1525],{"type":58,"value":1526},"assumeNotNull(...)",{"type":58,"value":1528},"):",{"type":52,"tag":245,"props":1530,"children":1532},{"className":1167,"code":1531,"language":1169,"meta":250,"style":250},"posthog:execute-sql\nSELECT\n    arrayJoin(JSONExtract(ifNull(toString(properties.$active_feature_flags), '[]'), 'Array(String)')) AS flag,\n    count() AS occurrences,\n    uniq(person_id) AS users\nFROM events\nWHERE event = '$exception'\n    AND (issue_id = '\u003Cissue_id>' OR properties.$exception_issue_id = '\u003Cissue_id>')\n    AND timestamp > now() - INTERVAL 14 DAY\n    AND notEmpty(toString(properties.$active_feature_flags))\nGROUP BY flag\nORDER BY occurrences DESC\nLIMIT 20\n",[1533],{"type":52,"tag":108,"props":1534,"children":1535},{"__ignoreMap":250},[1536,1543,1550,1558,1565,1573,1580,1587,1594,1602,1610,1618,1625],{"type":52,"tag":256,"props":1537,"children":1538},{"class":258,"line":259},[1539],{"type":52,"tag":256,"props":1540,"children":1541},{},[1542],{"type":58,"value":1181},{"type":52,"tag":256,"props":1544,"children":1545},{"class":258,"line":269},[1546],{"type":52,"tag":256,"props":1547,"children":1548},{},[1549],{"type":58,"value":1189},{"type":52,"tag":256,"props":1551,"children":1552},{"class":258,"line":279},[1553],{"type":52,"tag":256,"props":1554,"children":1555},{},[1556],{"type":58,"value":1557},"    arrayJoin(JSONExtract(ifNull(toString(properties.$active_feature_flags), '[]'), 'Array(String)')) AS flag,\n",{"type":52,"tag":256,"props":1559,"children":1560},{"class":258,"line":324},[1561],{"type":52,"tag":256,"props":1562,"children":1563},{},[1564],{"type":58,"value":1205},{"type":52,"tag":256,"props":1566,"children":1567},{"class":258,"line":386},[1568],{"type":52,"tag":256,"props":1569,"children":1570},{},[1571],{"type":58,"value":1572},"    uniq(person_id) AS users\n",{"type":52,"tag":256,"props":1574,"children":1575},{"class":258,"line":412},[1576],{"type":52,"tag":256,"props":1577,"children":1578},{},[1579],{"type":58,"value":1238},{"type":52,"tag":256,"props":1581,"children":1582},{"class":258,"line":439},[1583],{"type":52,"tag":256,"props":1584,"children":1585},{},[1586],{"type":58,"value":1247},{"type":52,"tag":256,"props":1588,"children":1589},{"class":258,"line":1232},[1590],{"type":52,"tag":256,"props":1591,"children":1592},{},[1593],{"type":58,"value":1256},{"type":52,"tag":256,"props":1595,"children":1596},{"class":258,"line":1241},[1597],{"type":52,"tag":256,"props":1598,"children":1599},{},[1600],{"type":58,"value":1601},"    AND timestamp > now() - INTERVAL 14 DAY\n",{"type":52,"tag":256,"props":1603,"children":1604},{"class":258,"line":1250},[1605],{"type":52,"tag":256,"props":1606,"children":1607},{},[1608],{"type":58,"value":1609},"    AND notEmpty(toString(properties.$active_feature_flags))\n",{"type":52,"tag":256,"props":1611,"children":1612},{"class":258,"line":1259},[1613],{"type":52,"tag":256,"props":1614,"children":1615},{},[1616],{"type":58,"value":1617},"GROUP BY flag\n",{"type":52,"tag":256,"props":1619,"children":1620},{"class":258,"line":1268},[1621],{"type":52,"tag":256,"props":1622,"children":1623},{},[1624],{"type":58,"value":1283},{"type":52,"tag":256,"props":1626,"children":1627},{"class":258,"line":1277},[1628],{"type":52,"tag":256,"props":1629,"children":1630},{},[1631],{"type":58,"value":1292},{"type":52,"tag":61,"props":1633,"children":1634},{},[1635,1637,1642,1644,1650,1652,1658,1660,1665],{"type":58,"value":1636},"Caveat: every event captures every evaluated flag key, so this enumeration often\nreturns identical counts across flags and ",{"type":52,"tag":1006,"props":1638,"children":1639},{},[1640],{"type":58,"value":1641},"doesn't tell you which flag\ncorrelates with the error",{"type":58,"value":1643}," — only which were on the user. To actually test a\nhypothesis, query the per-flag value column ",{"type":52,"tag":108,"props":1645,"children":1647},{"className":1646},[],[1648],{"type":58,"value":1649},"properties.$feature\u002F\u003Cflag-key>",{"type":58,"value":1651},",\nwhich carries the evaluated value (",{"type":52,"tag":108,"props":1653,"children":1655},{"className":1654},[],[1656],{"type":58,"value":1657},"true",{"type":58,"value":1659},"\u002F",{"type":52,"tag":108,"props":1661,"children":1663},{"className":1662},[],[1664],{"type":58,"value":764},{"type":58,"value":1666},"\u002Fvariant name):",{"type":52,"tag":245,"props":1668,"children":1670},{"className":1167,"code":1669,"language":1169,"meta":250,"style":250},"posthog:execute-sql\nSELECT\n    properties.`$feature\u002Fmy-flag-key` AS variant,\n    count() AS occurrences,\n    uniq(person_id) AS users\nFROM events\nWHERE event = '$exception'\n    AND (issue_id = '\u003Cissue_id>' OR properties.$exception_issue_id = '\u003Cissue_id>')\n    AND timestamp > now() - INTERVAL 14 DAY\nGROUP BY variant\nORDER BY occurrences DESC\n",[1671],{"type":52,"tag":108,"props":1672,"children":1673},{"__ignoreMap":250},[1674,1681,1688,1696,1703,1710,1717,1724,1731,1738,1746],{"type":52,"tag":256,"props":1675,"children":1676},{"class":258,"line":259},[1677],{"type":52,"tag":256,"props":1678,"children":1679},{},[1680],{"type":58,"value":1181},{"type":52,"tag":256,"props":1682,"children":1683},{"class":258,"line":269},[1684],{"type":52,"tag":256,"props":1685,"children":1686},{},[1687],{"type":58,"value":1189},{"type":52,"tag":256,"props":1689,"children":1690},{"class":258,"line":279},[1691],{"type":52,"tag":256,"props":1692,"children":1693},{},[1694],{"type":58,"value":1695},"    properties.`$feature\u002Fmy-flag-key` AS variant,\n",{"type":52,"tag":256,"props":1697,"children":1698},{"class":258,"line":324},[1699],{"type":52,"tag":256,"props":1700,"children":1701},{},[1702],{"type":58,"value":1205},{"type":52,"tag":256,"props":1704,"children":1705},{"class":258,"line":386},[1706],{"type":52,"tag":256,"props":1707,"children":1708},{},[1709],{"type":58,"value":1572},{"type":52,"tag":256,"props":1711,"children":1712},{"class":258,"line":412},[1713],{"type":52,"tag":256,"props":1714,"children":1715},{},[1716],{"type":58,"value":1238},{"type":52,"tag":256,"props":1718,"children":1719},{"class":258,"line":439},[1720],{"type":52,"tag":256,"props":1721,"children":1722},{},[1723],{"type":58,"value":1247},{"type":52,"tag":256,"props":1725,"children":1726},{"class":258,"line":1232},[1727],{"type":52,"tag":256,"props":1728,"children":1729},{},[1730],{"type":58,"value":1256},{"type":52,"tag":256,"props":1732,"children":1733},{"class":258,"line":1241},[1734],{"type":52,"tag":256,"props":1735,"children":1736},{},[1737],{"type":58,"value":1601},{"type":52,"tag":256,"props":1739,"children":1740},{"class":258,"line":1250},[1741],{"type":52,"tag":256,"props":1742,"children":1743},{},[1744],{"type":58,"value":1745},"GROUP BY variant\n",{"type":52,"tag":256,"props":1747,"children":1748},{"class":258,"line":1259},[1749],{"type":52,"tag":256,"props":1750,"children":1751},{},[1752],{"type":58,"value":1283},{"type":52,"tag":61,"props":1754,"children":1755},{},[1756],{"type":58,"value":1757},"Compare the variant split here to the project's overall exposure on the same\nflag in the same window. Disproportionate representation of one variant\nsuggests the flag is involved in the cause — not a guarantee, but a strong\nhypothesis.",{"type":52,"tag":233,"props":1759,"children":1761},{"id":1760},"step-5-reconstruct-what-happened-around-the-error",[1762],{"type":58,"value":1763},"Step 5 — Reconstruct what happened around the error",{"type":52,"tag":61,"props":1765,"children":1766},{},[1767,1769,1774],{"type":58,"value":1768},"Use the ",{"type":52,"tag":108,"props":1770,"children":1772},{"className":1771},[],[1773],{"type":58,"value":149},{"type":58,"value":1775}," from the sample event in step 2 to pull the activity\nsurrounding the exception. Three sources stack on each other; run the ones\nthat make sense for the SDK that captured the error.",{"type":52,"tag":935,"props":1777,"children":1779},{"id":1778},"_5a-surrounding-events-client-sdks-by-session_id",[1780,1782,1787],{"type":58,"value":1781},"5a. Surrounding events (client SDKs by ",{"type":52,"tag":108,"props":1783,"children":1785},{"className":1784},[],[1786],{"type":58,"value":149},{"type":58,"value":208},{"type":52,"tag":61,"props":1789,"children":1790},{},[1791],{"type":58,"value":1792},"Mirrors the ET frontend session timeline. Pulls custom events, page views,\nand other exceptions captured under the same session within a ±1h window:",{"type":52,"tag":245,"props":1794,"children":1796},{"className":1167,"code":1795,"language":1169,"meta":250,"style":250},"posthog:execute-sql\nSELECT\n    uuid,\n    event,\n    timestamp,\n    properties.$lib AS lib,\n    properties.$current_url AS url\nFROM events\nWHERE $session_id = '\u003Csession_id_from_step_2>'\n    AND (event = '$exception' OR event = '$pageview' OR left(event, 1) != '$')\n    AND timestamp >= toDateTime('\u003Cerror_timestamp>', 'UTC') - INTERVAL 1 HOUR\n    AND timestamp \u003C= toDateTime('\u003Cerror_timestamp>', 'UTC') + INTERVAL 1 HOUR\nORDER BY timestamp ASC\nLIMIT 100\n",[1797],{"type":52,"tag":108,"props":1798,"children":1799},{"__ignoreMap":250},[1800,1807,1814,1822,1830,1838,1846,1854,1861,1869,1877,1885,1893,1901],{"type":52,"tag":256,"props":1801,"children":1802},{"class":258,"line":259},[1803],{"type":52,"tag":256,"props":1804,"children":1805},{},[1806],{"type":58,"value":1181},{"type":52,"tag":256,"props":1808,"children":1809},{"class":258,"line":269},[1810],{"type":52,"tag":256,"props":1811,"children":1812},{},[1813],{"type":58,"value":1189},{"type":52,"tag":256,"props":1815,"children":1816},{"class":258,"line":279},[1817],{"type":52,"tag":256,"props":1818,"children":1819},{},[1820],{"type":58,"value":1821},"    uuid,\n",{"type":52,"tag":256,"props":1823,"children":1824},{"class":258,"line":324},[1825],{"type":52,"tag":256,"props":1826,"children":1827},{},[1828],{"type":58,"value":1829},"    event,\n",{"type":52,"tag":256,"props":1831,"children":1832},{"class":258,"line":386},[1833],{"type":52,"tag":256,"props":1834,"children":1835},{},[1836],{"type":58,"value":1837},"    timestamp,\n",{"type":52,"tag":256,"props":1839,"children":1840},{"class":258,"line":412},[1841],{"type":52,"tag":256,"props":1842,"children":1843},{},[1844],{"type":58,"value":1845},"    properties.$lib AS lib,\n",{"type":52,"tag":256,"props":1847,"children":1848},{"class":258,"line":439},[1849],{"type":52,"tag":256,"props":1850,"children":1851},{},[1852],{"type":58,"value":1853},"    properties.$current_url AS url\n",{"type":52,"tag":256,"props":1855,"children":1856},{"class":258,"line":1232},[1857],{"type":52,"tag":256,"props":1858,"children":1859},{},[1860],{"type":58,"value":1238},{"type":52,"tag":256,"props":1862,"children":1863},{"class":258,"line":1241},[1864],{"type":52,"tag":256,"props":1865,"children":1866},{},[1867],{"type":58,"value":1868},"WHERE $session_id = '\u003Csession_id_from_step_2>'\n",{"type":52,"tag":256,"props":1870,"children":1871},{"class":258,"line":1250},[1872],{"type":52,"tag":256,"props":1873,"children":1874},{},[1875],{"type":58,"value":1876},"    AND (event = '$exception' OR event = '$pageview' OR left(event, 1) != '$')\n",{"type":52,"tag":256,"props":1878,"children":1879},{"class":258,"line":1259},[1880],{"type":52,"tag":256,"props":1881,"children":1882},{},[1883],{"type":58,"value":1884},"    AND timestamp >= toDateTime('\u003Cerror_timestamp>', 'UTC') - INTERVAL 1 HOUR\n",{"type":52,"tag":256,"props":1886,"children":1887},{"class":258,"line":1268},[1888],{"type":52,"tag":256,"props":1889,"children":1890},{},[1891],{"type":58,"value":1892},"    AND timestamp \u003C= toDateTime('\u003Cerror_timestamp>', 'UTC') + INTERVAL 1 HOUR\n",{"type":52,"tag":256,"props":1894,"children":1895},{"class":258,"line":1277},[1896],{"type":52,"tag":256,"props":1897,"children":1898},{},[1899],{"type":58,"value":1900},"ORDER BY timestamp ASC\n",{"type":52,"tag":256,"props":1902,"children":1903},{"class":258,"line":1286},[1904],{"type":52,"tag":256,"props":1905,"children":1906},{},[1907],{"type":58,"value":1908},"LIMIT 100\n",{"type":52,"tag":61,"props":1910,"children":1911},{},[1912,1913,1919,1921,1927,1928,1934],{"type":58,"value":1297},{"type":52,"tag":108,"props":1914,"children":1916},{"className":1915},[],[1917],{"type":58,"value":1918},"left(event, 1) != '$'",{"type":58,"value":1920}," clause drops PostHog autocapture \u002F system events\nwhile keeping every custom event. The ",{"type":52,"tag":108,"props":1922,"children":1924},{"className":1923},[],[1925],{"type":58,"value":1926},"OR event = '$pageview'",{"type":58,"value":1659},{"type":52,"tag":108,"props":1929,"children":1931},{"className":1930},[],[1932],{"type":58,"value":1933},"'$exception'",{"type":58,"value":1935},"\nexceptions re-add the two system events worth seeing on the timeline. This is\nthe same filter the ET UI uses.",{"type":52,"tag":61,"props":1937,"children":1938},{},[1939,1941,1947,1949,1954],{"type":58,"value":1940},"Mixed ",{"type":52,"tag":108,"props":1942,"children":1944},{"className":1943},[],[1945],{"type":58,"value":1946},"$lib",{"type":58,"value":1948}," values in the output are a feature, not noise. When a server SDK\npropagates ",{"type":52,"tag":108,"props":1950,"children":1952},{"className":1951},[],[1953],{"type":58,"value":149},{"type":58,"value":1955}," from the client request (PostHog's own backend does\nthis), the timeline shows server-side activity inline with the browser side —\n\"both SDKs when available\" for free. Skim the lib column to see how each row\nwas produced.",{"type":52,"tag":61,"props":1957,"children":1958},{},[1959],{"type":58,"value":1960},"The skill defaults to a ±1h window because that's what the UI uses; widen it\nwhen an issue's actions are slow (long batch jobs, background workers) or\ntighten it when only the seconds right before the throw matter.",{"type":52,"tag":935,"props":1962,"children":1964},{"id":1963},"_5b-console-logs-web-react-native-session-replay",[1965],{"type":58,"value":1966},"5b. Console logs (web \u002F React Native session replay)",{"type":52,"tag":61,"props":1968,"children":1969},{},[1970,1972,1978,1980,1986],{"type":58,"value":1971},"When session replay is enabled, the replay pipeline emits ",{"type":52,"tag":108,"props":1973,"children":1975},{"className":1974},[],[1976],{"type":58,"value":1977},"console.*",{"type":58,"value":1979}," calls\ninto the ",{"type":52,"tag":108,"props":1981,"children":1983},{"className":1982},[],[1984],{"type":58,"value":1985},"log_entries",{"type":58,"value":1987}," table tagged with the same session id. Pull them with\nthe matching window:",{"type":52,"tag":245,"props":1989,"children":1991},{"className":1167,"code":1990,"language":1169,"meta":250,"style":250},"posthog:execute-sql\nSELECT timestamp, level, message\nFROM log_entries\nWHERE log_source = 'session_replay'\n    AND log_source_id = '\u003Csession_id_from_step_2>'\n    AND timestamp >= toDateTime('\u003Cerror_timestamp>', 'UTC') - INTERVAL 1 HOUR\n    AND timestamp \u003C= toDateTime('\u003Cerror_timestamp>', 'UTC') + INTERVAL 1 HOUR\nORDER BY timestamp ASC\nLIMIT 200\n",[1992],{"type":52,"tag":108,"props":1993,"children":1994},{"__ignoreMap":250},[1995,2002,2010,2018,2026,2034,2041,2048,2055],{"type":52,"tag":256,"props":1996,"children":1997},{"class":258,"line":259},[1998],{"type":52,"tag":256,"props":1999,"children":2000},{},[2001],{"type":58,"value":1181},{"type":52,"tag":256,"props":2003,"children":2004},{"class":258,"line":269},[2005],{"type":52,"tag":256,"props":2006,"children":2007},{},[2008],{"type":58,"value":2009},"SELECT timestamp, level, message\n",{"type":52,"tag":256,"props":2011,"children":2012},{"class":258,"line":279},[2013],{"type":52,"tag":256,"props":2014,"children":2015},{},[2016],{"type":58,"value":2017},"FROM log_entries\n",{"type":52,"tag":256,"props":2019,"children":2020},{"class":258,"line":324},[2021],{"type":52,"tag":256,"props":2022,"children":2023},{},[2024],{"type":58,"value":2025},"WHERE log_source = 'session_replay'\n",{"type":52,"tag":256,"props":2027,"children":2028},{"class":258,"line":386},[2029],{"type":52,"tag":256,"props":2030,"children":2031},{},[2032],{"type":58,"value":2033},"    AND log_source_id = '\u003Csession_id_from_step_2>'\n",{"type":52,"tag":256,"props":2035,"children":2036},{"class":258,"line":412},[2037],{"type":52,"tag":256,"props":2038,"children":2039},{},[2040],{"type":58,"value":1884},{"type":52,"tag":256,"props":2042,"children":2043},{"class":258,"line":439},[2044],{"type":52,"tag":256,"props":2045,"children":2046},{},[2047],{"type":58,"value":1892},{"type":52,"tag":256,"props":2049,"children":2050},{"class":258,"line":1232},[2051],{"type":52,"tag":256,"props":2052,"children":2053},{},[2054],{"type":58,"value":1900},{"type":52,"tag":256,"props":2056,"children":2057},{"class":258,"line":1241},[2058],{"type":52,"tag":256,"props":2059,"children":2060},{},[2061],{"type":58,"value":2062},"LIMIT 200\n",{"type":52,"tag":61,"props":2064,"children":2065},{},[2066,2072,2074,2079],{"type":52,"tag":108,"props":2067,"children":2069},{"className":2068},[],[2070],{"type":58,"value":2071},"log_source = 'session_replay'",{"type":58,"value":2073}," is the discriminator — ",{"type":52,"tag":108,"props":2075,"children":2077},{"className":2076},[],[2078],{"type":58,"value":1985},{"type":58,"value":2080}," is shared\nwith other sources. Empty results are common: either replay isn't enabled, or\nthis specific session wasn't recorded. Mention that in the synthesis rather\nthan treating it as a failure.",{"type":52,"tag":935,"props":2082,"children":2084},{"id":2083},"_5c-server-logs-around-the-error-otel-via-query-logs",[2085,2087,2093],{"type":58,"value":2086},"5c. Server logs around the error (OTEL via ",{"type":52,"tag":108,"props":2088,"children":2090},{"className":2089},[],[2091],{"type":58,"value":2092},"query-logs",{"type":58,"value":208},{"type":52,"tag":61,"props":2095,"children":2096},{},[2097,2099,2104,2106,2112],{"type":58,"value":2098},"For server-side exceptions, correlate the exception timestamp with OTEL log\nentries the customer ingests. Many projects don't ingest logs at all — if\n",{"type":52,"tag":108,"props":2100,"children":2102},{"className":2101},[],[2103],{"type":58,"value":2092},{"type":58,"value":2105}," returns nothing or errors, say so and move on. Discover available\nservices first with ",{"type":52,"tag":108,"props":2107,"children":2109},{"className":2108},[],[2110],{"type":58,"value":2111},"logs-attribute-values-list",{"type":58,"value":2113}," when you don't know which\nservice produced the error.",{"type":52,"tag":245,"props":2115,"children":2117},{"className":247,"code":2116,"language":249,"meta":250,"style":250},"posthog:query-logs\n{\n  \"query\": {\n    \"dateRange\": {\n      \"date_from\": \"\u003Cerror_timestamp minus 5 minutes>\",\n      \"date_to\":   \"\u003Cerror_timestamp plus 5 minutes>\"\n    },\n    \"severityLevels\": [\"error\", \"warn\"],\n    \"serviceNames\": [\"\u003Cservice.name if known>\"],\n    \"limit\": 50,\n    \"orderBy\": \"earliest\"\n  }\n}\n",[2118],{"type":52,"tag":108,"props":2119,"children":2120},{"__ignoreMap":250},[2121,2129,2136,2161,2185,2222,2256,2264,2323,2364,2392,2425,2433],{"type":52,"tag":256,"props":2122,"children":2123},{"class":258,"line":259},[2124],{"type":52,"tag":256,"props":2125,"children":2126},{"style":263},[2127],{"type":58,"value":2128},"posthog:query-logs\n",{"type":52,"tag":256,"props":2130,"children":2131},{"class":258,"line":269},[2132],{"type":52,"tag":256,"props":2133,"children":2134},{"style":273},[2135],{"type":58,"value":276},{"type":52,"tag":256,"props":2137,"children":2138},{"class":258,"line":279},[2139,2143,2148,2152,2156],{"type":52,"tag":256,"props":2140,"children":2141},{"style":273},[2142],{"type":58,"value":285},{"type":52,"tag":256,"props":2144,"children":2145},{"style":288},[2146],{"type":58,"value":2147},"query",{"type":52,"tag":256,"props":2149,"children":2150},{"style":273},[2151],{"type":58,"value":296},{"type":52,"tag":256,"props":2153,"children":2154},{"style":273},[2155],{"type":58,"value":301},{"type":52,"tag":256,"props":2157,"children":2158},{"style":273},[2159],{"type":58,"value":2160}," {\n",{"type":52,"tag":256,"props":2162,"children":2163},{"class":258,"line":324},[2164,2169,2173,2177,2181],{"type":52,"tag":256,"props":2165,"children":2166},{"style":273},[2167],{"type":58,"value":2168},"    \"",{"type":52,"tag":256,"props":2170,"children":2171},{"style":354},[2172],{"type":58,"value":334},{"type":52,"tag":256,"props":2174,"children":2175},{"style":273},[2176],{"type":58,"value":296},{"type":52,"tag":256,"props":2178,"children":2179},{"style":273},[2180],{"type":58,"value":301},{"type":52,"tag":256,"props":2182,"children":2183},{"style":273},[2184],{"type":58,"value":2160},{"type":52,"tag":256,"props":2186,"children":2187},{"class":258,"line":386},[2188,2193,2197,2201,2205,2209,2214,2218],{"type":52,"tag":256,"props":2189,"children":2190},{"style":273},[2191],{"type":58,"value":2192},"      \"",{"type":52,"tag":256,"props":2194,"children":2195},{"style":433},[2196],{"type":58,"value":357},{"type":52,"tag":256,"props":2198,"children":2199},{"style":273},[2200],{"type":58,"value":296},{"type":52,"tag":256,"props":2202,"children":2203},{"style":273},[2204],{"type":58,"value":301},{"type":52,"tag":256,"props":2206,"children":2207},{"style":273},[2208],{"type":58,"value":306},{"type":52,"tag":256,"props":2210,"children":2211},{"style":309},[2212],{"type":58,"value":2213},"\u003Cerror_timestamp minus 5 minutes>",{"type":52,"tag":256,"props":2215,"children":2216},{"style":273},[2217],{"type":58,"value":296},{"type":52,"tag":256,"props":2219,"children":2220},{"style":273},[2221],{"type":58,"value":321},{"type":52,"tag":256,"props":2223,"children":2224},{"class":258,"line":412},[2225,2229,2233,2237,2241,2246,2251],{"type":52,"tag":256,"props":2226,"children":2227},{"style":273},[2228],{"type":58,"value":2192},{"type":52,"tag":256,"props":2230,"children":2231},{"style":433},[2232],{"type":58,"value":806},{"type":52,"tag":256,"props":2234,"children":2235},{"style":273},[2236],{"type":58,"value":296},{"type":52,"tag":256,"props":2238,"children":2239},{"style":273},[2240],{"type":58,"value":301},{"type":52,"tag":256,"props":2242,"children":2243},{"style":273},[2244],{"type":58,"value":2245},"   \"",{"type":52,"tag":256,"props":2247,"children":2248},{"style":309},[2249],{"type":58,"value":2250},"\u003Cerror_timestamp plus 5 minutes>",{"type":52,"tag":256,"props":2252,"children":2253},{"style":273},[2254],{"type":58,"value":2255},"\"\n",{"type":52,"tag":256,"props":2257,"children":2258},{"class":258,"line":439},[2259],{"type":52,"tag":256,"props":2260,"children":2261},{"style":273},[2262],{"type":58,"value":2263},"    },\n",{"type":52,"tag":256,"props":2265,"children":2266},{"class":258,"line":1232},[2267,2271,2276,2280,2284,2288,2292,2297,2301,2305,2309,2314,2318],{"type":52,"tag":256,"props":2268,"children":2269},{"style":273},[2270],{"type":58,"value":2168},{"type":52,"tag":256,"props":2272,"children":2273},{"style":354},[2274],{"type":58,"value":2275},"severityLevels",{"type":52,"tag":256,"props":2277,"children":2278},{"style":273},[2279],{"type":58,"value":296},{"type":52,"tag":256,"props":2281,"children":2282},{"style":273},[2283],{"type":58,"value":301},{"type":52,"tag":256,"props":2285,"children":2286},{"style":273},[2287],{"type":58,"value":651},{"type":52,"tag":256,"props":2289,"children":2290},{"style":273},[2291],{"type":58,"value":296},{"type":52,"tag":256,"props":2293,"children":2294},{"style":309},[2295],{"type":58,"value":2296},"error",{"type":52,"tag":256,"props":2298,"children":2299},{"style":273},[2300],{"type":58,"value":296},{"type":52,"tag":256,"props":2302,"children":2303},{"style":273},[2304],{"type":58,"value":669},{"type":52,"tag":256,"props":2306,"children":2307},{"style":273},[2308],{"type":58,"value":306},{"type":52,"tag":256,"props":2310,"children":2311},{"style":309},[2312],{"type":58,"value":2313},"warn",{"type":52,"tag":256,"props":2315,"children":2316},{"style":273},[2317],{"type":58,"value":296},{"type":52,"tag":256,"props":2319,"children":2320},{"style":273},[2321],{"type":58,"value":2322},"],\n",{"type":52,"tag":256,"props":2324,"children":2325},{"class":258,"line":1241},[2326,2330,2335,2339,2343,2347,2351,2356,2360],{"type":52,"tag":256,"props":2327,"children":2328},{"style":273},[2329],{"type":58,"value":2168},{"type":52,"tag":256,"props":2331,"children":2332},{"style":354},[2333],{"type":58,"value":2334},"serviceNames",{"type":52,"tag":256,"props":2336,"children":2337},{"style":273},[2338],{"type":58,"value":296},{"type":52,"tag":256,"props":2340,"children":2341},{"style":273},[2342],{"type":58,"value":301},{"type":52,"tag":256,"props":2344,"children":2345},{"style":273},[2346],{"type":58,"value":651},{"type":52,"tag":256,"props":2348,"children":2349},{"style":273},[2350],{"type":58,"value":296},{"type":52,"tag":256,"props":2352,"children":2353},{"style":309},[2354],{"type":58,"value":2355},"\u003Cservice.name if known>",{"type":52,"tag":256,"props":2357,"children":2358},{"style":273},[2359],{"type":58,"value":296},{"type":52,"tag":256,"props":2361,"children":2362},{"style":273},[2363],{"type":58,"value":2322},{"type":52,"tag":256,"props":2365,"children":2366},{"class":258,"line":1250},[2367,2371,2375,2379,2383,2388],{"type":52,"tag":256,"props":2368,"children":2369},{"style":273},[2370],{"type":58,"value":2168},{"type":52,"tag":256,"props":2372,"children":2373},{"style":354},[2374],{"type":58,"value":609},{"type":52,"tag":256,"props":2376,"children":2377},{"style":273},[2378],{"type":58,"value":296},{"type":52,"tag":256,"props":2380,"children":2381},{"style":273},[2382],{"type":58,"value":301},{"type":52,"tag":256,"props":2384,"children":2385},{"style":433},[2386],{"type":58,"value":2387}," 50",{"type":52,"tag":256,"props":2389,"children":2390},{"style":273},[2391],{"type":58,"value":321},{"type":52,"tag":256,"props":2393,"children":2394},{"class":258,"line":1259},[2395,2399,2404,2408,2412,2416,2421],{"type":52,"tag":256,"props":2396,"children":2397},{"style":273},[2398],{"type":58,"value":2168},{"type":52,"tag":256,"props":2400,"children":2401},{"style":354},[2402],{"type":58,"value":2403},"orderBy",{"type":52,"tag":256,"props":2405,"children":2406},{"style":273},[2407],{"type":58,"value":296},{"type":52,"tag":256,"props":2409,"children":2410},{"style":273},[2411],{"type":58,"value":301},{"type":52,"tag":256,"props":2413,"children":2414},{"style":273},[2415],{"type":58,"value":306},{"type":52,"tag":256,"props":2417,"children":2418},{"style":309},[2419],{"type":58,"value":2420},"earliest",{"type":52,"tag":256,"props":2422,"children":2423},{"style":273},[2424],{"type":58,"value":2255},{"type":52,"tag":256,"props":2426,"children":2427},{"class":258,"line":1268},[2428],{"type":52,"tag":256,"props":2429,"children":2430},{"style":273},[2431],{"type":58,"value":2432},"  }\n",{"type":52,"tag":256,"props":2434,"children":2435},{"class":258,"line":1277},[2436],{"type":52,"tag":256,"props":2437,"children":2438},{"style":273},[2439],{"type":58,"value":445},{"type":52,"tag":61,"props":2441,"children":2442},{},[2443],{"type":58,"value":2444},"Caveats worth knowing before relying on this output:",{"type":52,"tag":2446,"props":2447,"children":2448},"ul",{},[2449,2455,2481],{"type":52,"tag":2450,"props":2451,"children":2452},"li",{},[2453],{"type":58,"value":2454},"Logs are ingested separately from events and typically have shorter retention.\nOld exceptions may return empty even though the issue is still active.",{"type":52,"tag":2450,"props":2456,"children":2457},{},[2458,2464,2465,2471,2473,2479],{"type":52,"tag":108,"props":2459,"children":2461},{"className":2460},[],[2462],{"type":58,"value":2463},"trace_id",{"type":58,"value":502},{"type":52,"tag":108,"props":2466,"children":2468},{"className":2467},[],[2469],{"type":58,"value":2470},"span_id",{"type":58,"value":2472}," come back zero-padded (",{"type":52,"tag":108,"props":2474,"children":2476},{"className":2475},[],[2477],{"type":58,"value":2478},"\"00000000...\"",{"type":58,"value":2480},") when not set.\nTrace-based correlation only works for explicitly instrumented requests, not\nfor every event.",{"type":52,"tag":2450,"props":2482,"children":2483},{},[2484,2490,2492,2497,2499,2505],{"type":52,"tag":108,"props":2485,"children":2487},{"className":2486},[],[2488],{"type":58,"value":2489},"service.name",{"type":58,"value":2491}," is a resource attribute. Narrow with ",{"type":52,"tag":108,"props":2493,"children":2495},{"className":2494},[],[2496],{"type":58,"value":2334},{"type":58,"value":2498}," rather\nthan a free-text ",{"type":52,"tag":108,"props":2500,"children":2502},{"className":2501},[],[2503],{"type":58,"value":2504},"searchTerm",{"type":58,"value":2506}," when you know the producer.",{"type":52,"tag":935,"props":2508,"children":2510},{"id":2509},"_5d-find-a-representative-replay",[2511],{"type":58,"value":2512},"5d. Find a representative replay",{"type":52,"tag":61,"props":2514,"children":2515},{},[2516,2518,2523,2525,2531],{"type":58,"value":2517},"Hand off to ",{"type":52,"tag":108,"props":2519,"children":2521},{"className":2520},[],[2522],{"type":58,"value":206},{"type":58,"value":2524}," when picking the ",{"type":52,"tag":2526,"props":2527,"children":2528},"em",{},[2529],{"type":58,"value":2530},"best",{"type":58,"value":2532}," session matters —\npopular issues link hundreds of recordings, mostly short crash fragments or\nidle-tab sessions, and that skill applies the duration \u002F active-time \u002F recency\nranking that finds the one most likely to show the cause. Hand off too when the\nuser asks for \"a replay\" without specifying which.",{"type":52,"tag":61,"props":2534,"children":2535},{},[2536,2538,2544,2546,2552],{"type":58,"value":2537},"Skip the hand-off and pull a recording inline via ",{"type":52,"tag":108,"props":2539,"children":2541},{"className":2540},[],[2542],{"type":58,"value":2543},"query-session-recordings-list",{"type":58,"value":2545},"\nwith ",{"type":52,"tag":108,"props":2547,"children":2549},{"className":2548},[],[2550],{"type":58,"value":2551},"session_ids",{"type":58,"value":2553}," from the sample exception events you already fetched in step 2\nwhen only a handful of sessions are linked, the user already named a specific\nsession, or any working example will do (e.g. proving the error reproduces).",{"type":52,"tag":61,"props":2555,"children":2556},{},[2557],{"type":58,"value":2558},"If neither path returns a recording, mention that session replay may not be\nenabled for the affected users — useful context, not a failure.",{"type":52,"tag":233,"props":2560,"children":2562},{"id":2561},"step-6-synthesize",[2563],{"type":58,"value":2564},"Step 6 — Synthesize",{"type":52,"tag":61,"props":2566,"children":2567},{},[2568],{"type":58,"value":2569},"Present in this order:",{"type":52,"tag":2571,"props":2572,"children":2573},"ol",{},[2574,2583,2593,2610,2620],{"type":52,"tag":2450,"props":2575,"children":2576},{},[2577,2581],{"type":52,"tag":1006,"props":2578,"children":2579},{},[2580],{"type":58,"value":964},{"type":58,"value":2582}," — type, message, where in the stack",{"type":52,"tag":2450,"props":2584,"children":2585},{},[2586,2591],{"type":52,"tag":1006,"props":2587,"children":2588},{},[2589],{"type":58,"value":2590},"Who it affects",{"type":58,"value":2592}," — total users, sessions, and any segment breakdown that\nstood out",{"type":52,"tag":2450,"props":2594,"children":2595},{},[2596,2601,2603,2608],{"type":52,"tag":1006,"props":2597,"children":2598},{},[2599],{"type":58,"value":2600},"When it started",{"type":58,"value":2602}," — ",{"type":52,"tag":108,"props":2604,"children":2606},{"className":2605},[],[2607],{"type":58,"value":478},{"type":58,"value":2609},", plus the release \u002F version that\nintroduced it if a breakdown found one",{"type":52,"tag":2450,"props":2611,"children":2612},{},[2613,2618],{"type":52,"tag":1006,"props":2614,"children":2615},{},[2616],{"type":58,"value":2617},"Likely cause",{"type":58,"value":2619}," — one or two hypotheses backed by the breakdowns above",{"type":52,"tag":2450,"props":2621,"children":2622},{},[2623,2628],{"type":52,"tag":1006,"props":2624,"children":2625},{},[2626],{"type":58,"value":2627},"Next step",{"type":58,"value":2629}," — a concrete action: investigate the suspected release, watch\nthe linked replay, ping the assignee, or escalate",{"type":52,"tag":61,"props":2631,"children":2632},{},[2633],{"type":58,"value":2634},"Keep the synthesis tight. The user wants the answer, not a tour of the data.",{"type":52,"tag":67,"props":2636,"children":2638},{"id":2637},"tips",[2639],{"type":58,"value":2640},"Tips",{"type":52,"tag":2446,"props":2642,"children":2643},{},[2644,2663,2689,2701,2706],{"type":52,"tag":2450,"props":2645,"children":2646},{},[2647,2649,2654,2656,2661],{"type":58,"value":2648},"The canonical join key from events to an issue is the resolved ",{"type":52,"tag":108,"props":2650,"children":2652},{"className":2651},[],[2653],{"type":58,"value":1311},{"type":58,"value":2655},"\nvirtual field, with ",{"type":52,"tag":108,"props":2657,"children":2659},{"className":2658},[],[2660],{"type":58,"value":1327},{"type":58,"value":2662}," as fallback — see Step 3\nfor the reason.",{"type":52,"tag":2450,"props":2664,"children":2665},{},[2666,2668,2673,2675,2680,2682,2687],{"type":58,"value":2667},"For a \"what version introduced this?\" breakdown, prefer ",{"type":52,"tag":108,"props":2669,"children":2671},{"className":2670},[],[2672],{"type":58,"value":1022},{"type":58,"value":2674}," (the\nuser's deployed app version, auto-captured on iOS \u002F React Native and\nmanually set on web \u002F server) or ",{"type":52,"tag":108,"props":2676,"children":2678},{"className":2677},[],[2679],{"type":58,"value":989},{"type":58,"value":2681}," when populated. Avoid\n",{"type":52,"tag":108,"props":2683,"children":2685},{"className":2684},[],[2686],{"type":58,"value":1057},{"type":58,"value":2688}," for this question — it's the PostHog SDK library version, not\nthe user's app. See the \"Picking the right version property\" subsection in\nStep 3.",{"type":52,"tag":2450,"props":2690,"children":2691},{},[2692,2694,2699],{"type":58,"value":2693},"If the issue spans more than 30 days, widen the date range explicitly.\nDefaults often truncate the original ",{"type":52,"tag":108,"props":2695,"children":2697},{"className":2696},[],[2698],{"type":58,"value":478},{"type":58,"value":2700}," event off the breakdown.",{"type":52,"tag":2450,"props":2702,"children":2703},{},[2704],{"type":58,"value":2705},"Don't propose a fix in the synthesis unless the cause is obvious from the\nsample stack. Hypotheses backed by data are more useful than confident\nguesses.",{"type":52,"tag":2450,"props":2707,"children":2708},{},[2709,2710,2716,2718,2724],{"type":58,"value":1334},{"type":52,"tag":108,"props":2711,"children":2713},{"className":2712},[],[2714],{"type":58,"value":2715},"query-error-tracking-issue",{"type":58,"value":2717}," returns an ",{"type":52,"tag":108,"props":2719,"children":2721},{"className":2720},[],[2722],{"type":58,"value":2723},"external_issues",{"type":58,"value":2725}," array, the issue\nis already linked to a Linear \u002F Jira \u002F GitHub ticket. Mention the link in the\nsynthesis so the user doesn't open a duplicate.",{"type":52,"tag":2727,"props":2728,"children":2729},"style",{},[2730],{"type":58,"value":2731},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2733,"total":2898},[2734,2748,2760,2772,2785,2798,2814,2831,2845,2860,2870,2888],{"slug":2735,"name":2735,"fn":2736,"description":2737,"org":2738,"tags":2739,"stars":20,"repoUrl":21,"updatedAt":2747},"analyzing-expensive-users","analyze expensive users in AI observability","Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2740,2742,2745,2746],{"name":2741,"slug":28,"type":15},"Analytics",{"name":2743,"slug":2744,"type":15},"Cost Optimization","cost-optimization",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-28T05:34:11.117757",{"slug":2749,"name":2749,"fn":2750,"description":2751,"org":2752,"tags":2753,"stars":20,"repoUrl":21,"updatedAt":2759},"auditing-endpoints","audit PostHog project endpoints","Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks \"what endpoints can I clean up?\", \"are any of my endpoints broken?\", \"which materialised versions are still being called?\", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2754,2755,2758],{"name":2741,"slug":28,"type":15},{"name":2756,"slug":2757,"type":15},"Audit","audit",{"name":9,"slug":8,"type":15},"2026-06-08T08:08:33.693989",{"slug":2761,"name":2761,"fn":2762,"description":2763,"org":2764,"tags":2765,"stars":20,"repoUrl":21,"updatedAt":2771},"auditing-warehouse-source-health","audit PostHog data warehouse source health","Audit the health of a PostHog project's data warehouse sources and syncs — find every broken or degraded source connection, sync schema, and webhook channel. Use when the user asks \"why are my imports failing?\", \"what's broken with my sources?\", \"why is my warehouse data stale?\", or wants a one-shot triage of source\u002Fsync health before deciding where to dig in. Produces a prioritized report grouped by severity, with recommended next steps. For materialized-view health use `auditing-warehouse-view-health`; for a single failing sync use `diagnosing-failed-warehouse-syncs`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2766,2767,2769,2770],{"name":2756,"slug":2757,"type":15},{"name":2768,"slug":30,"type":15},"Data Warehouse",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:22:57.67984",{"slug":2773,"name":2773,"fn":2774,"description":2775,"org":2776,"tags":2777,"stars":20,"repoUrl":21,"updatedAt":2784},"auditing-warehouse-view-health","audit PostHog materialized view health","Audit the health of a PostHog project's materialized views (saved queries) — find every failed materialization and flag unused or stale materialized views that cost storage and compute. Use when the user asks \"which of my views are broken?\", \"why is this materialized view failing?\", \"are any of my views wasting compute?\", or wants a one-shot triage of view health. For source\u002Fsync health use `auditing-warehouse-source-health`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2778,2779,2780,2783],{"name":2756,"slug":2757,"type":15},{"name":2768,"slug":30,"type":15},{"name":2781,"slug":2782,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-06-18T08:25:10.936787",{"slug":2786,"name":2786,"fn":2787,"description":2788,"org":2789,"tags":2790,"stars":20,"repoUrl":21,"updatedAt":2797},"authoring-error-tracking-alerts","author PostHog error tracking alerts","Author error tracking alerts that fire when an issue is created, reopened, or starts spiking. Use when the user asks to set up error notifications, route exceptions to Slack\u002Fwebhook\u002FLinear, or evaluate which error events are worth alerting on. Covers trigger-event selection, integration choice, dedup against existing alerts, and shipping with the canonical message body shape.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2791,2794,2795,2796],{"name":2792,"slug":2793,"type":15},"Alerting","alerting",{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:24:40.318583",{"slug":2799,"name":2799,"fn":2800,"description":2801,"org":2802,"tags":2803,"stars":20,"repoUrl":21,"updatedAt":2813},"authoring-log-alerts","author log alerts in PostHog","Author useful, low-noise log alerts on services in a PostHog project. Use when the user asks to set up alerts for their logs, suggest alerts they should add, or evaluate whether a service is worth monitoring. Covers service triage, baseline characterisation, threshold drafting, back-testing via simulate, and shipping with a notification destination.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2804,2805,2808,2809,2812],{"name":2741,"slug":28,"type":15},{"name":2806,"slug":2807,"type":15},"Monitoring","monitoring",{"name":13,"slug":14,"type":15},{"name":2810,"slug":2811,"type":15},"Operations","operations",{"name":9,"slug":8,"type":15},"2026-07-18T05:10:54.430898",{"slug":2815,"name":2815,"fn":2816,"description":2817,"org":2818,"tags":2819,"stars":20,"repoUrl":21,"updatedAt":2830},"building-workflows","build and edit PostHog workflows","Build, edit, test, enable, and monitor PostHog workflows over MCP. Author the action\u002Fedge graph so it runs and opens cleanly in the visual editor, then change drafts surgically with patch operations. Use when asked to build, set up, automate, change, fix, or debug a workflow, campaign, broadcast, drip sequence, or event-triggered automation in the workflows product.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2820,2823,2826,2827],{"name":2821,"slug":2822,"type":15},"Automation","automation",{"name":2824,"slug":2825,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},{"name":2828,"slug":2829,"type":15},"Workflow Automation","workflow-automation","2026-07-28T05:34:12.167015",{"slug":2832,"name":2832,"fn":2833,"description":2834,"org":2835,"tags":2836,"stars":20,"repoUrl":21,"updatedAt":2844},"check-posthog-loading","inspect PostHog SDK loading across URLs","Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2837,2838,2839,2842,2843],{"name":2741,"slug":28,"type":15},{"name":18,"slug":19,"type":15},{"name":2840,"slug":2841,"type":15},"Frontend","frontend",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-05-07T05:56:19.828048",{"slug":2846,"name":2846,"fn":2847,"description":2848,"org":2849,"tags":2850,"stars":20,"repoUrl":21,"updatedAt":2859},"consuming-endpoints-from-client-code","integrate PostHog endpoints into client applications","Wire a PostHog endpoint into a client app or SDK. Covers fetching the OpenAPI spec, generating a typed client with openapi-generator or @hey-api\u002Fopenapi-ts, sending the right auth header, shaping the variables payload (HogQL code_name vs insight breakdown property), handling rate-limit and materialised-endpoint error responses. Use when the user says \"how do I call my endpoint\", \"generate a client for this\", or \"what auth header do I use\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2851,2854,2855,2856],{"name":2852,"slug":2853,"type":15},"API Development","api-development",{"name":2840,"slug":2841,"type":15},{"name":9,"slug":8,"type":15},{"name":2857,"slug":2858,"type":15},"SDK","sdk","2026-06-08T08:08:34.929454",{"slug":2861,"name":2861,"fn":2862,"description":2863,"org":2864,"tags":2865,"stars":20,"repoUrl":21,"updatedAt":2869},"copying-endpoints-across-projects","copy PostHog endpoints across projects","Copy a PostHog endpoint (a saved HogQL\u002Finsight query exposed as an API route) to another project in the same organization, or duplicate it under a new name in the same project. Use when the user wants to duplicate an endpoint, promote an endpoint from staging to production, replicate an endpoint's query\u002Fvariables\u002Ffreshness config in another workspace, or clone an endpoint to iterate on it. Unlike feature flags and experiments, endpoints have NO native cross-project copy tool — this skill covers the read-then-recreate flow (endpoint-get then endpoint-create), the active-project switching it requires, name-collision checks, and the safe defaults (land unmaterialised in the target, verify with endpoint-run). Does not cover editing endpoint versions (see managing-endpoint-versions) or authoring a brand-new endpoint from scratch (see creating-an-endpoint).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2866,2867,2868],{"name":2852,"slug":2853,"type":15},{"name":2810,"slug":2811,"type":15},{"name":9,"slug":8,"type":15},"2026-07-15T05:29:58.442727",{"slug":2871,"name":2871,"fn":2872,"description":2873,"org":2874,"tags":2875,"stars":20,"repoUrl":21,"updatedAt":2887},"creating-ai-subscription","schedule recurring AI-generated PostHog reports","Create a recurring AI-generated PostHog report — schedule a free-text prompt to run on a cron, with the LLM-synthesized markdown delivered to email or Slack on each tick. Use when the user wants a recurring AI summary of X on any cadence (daily, weekly, monthly, yearly) rather than a one-off report. (To attach an AI summary to an existing insight\u002Fdashboard subscription instead of a free-text prompt, see `managing-subscriptions` and its `summary_enabled` option.)\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2876,2877,2880,2881,2884],{"name":2821,"slug":2822,"type":15},{"name":2878,"slug":2879,"type":15},"Email","email",{"name":9,"slug":8,"type":15},{"name":2882,"slug":2883,"type":15},"Reporting","reporting",{"name":2885,"slug":2886,"type":15},"Slack","slack","2026-06-09T07:32:27.935712",{"slug":2889,"name":2889,"fn":2890,"description":2891,"org":2892,"tags":2893,"stars":20,"repoUrl":21,"updatedAt":2897},"creating-an-endpoint","create PostHog API endpoints","Create a PostHog endpoint with the right shape on the first try — covers query kind choice, name conventions, what to expose as variables (HogQL code_name vs insight breakdown), data_freshness_seconds, and whether to materialise on day one. Use when the user says \"create an endpoint\", \"expose this query as an API\", \"turn this insight into an endpoint\", or asks for help structuring a new endpoint. Steers away from common mistakes: materialising a query with cohort breakdowns or compare mode, inline-only variables on a materialised endpoint, unbounded date ranges, ambiguous names.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2894,2895,2896],{"name":2741,"slug":28,"type":15},{"name":2852,"slug":2853,"type":15},{"name":9,"slug":8,"type":15},"2026-06-08T08:08:29.624498",231,{"items":2900,"total":2950},[2901,2908,2914,2921,2928,2935,2943],{"slug":2735,"name":2735,"fn":2736,"description":2737,"org":2902,"tags":2903,"stars":20,"repoUrl":21,"updatedAt":2747},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2904,2905,2906,2907],{"name":2741,"slug":28,"type":15},{"name":2743,"slug":2744,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":2749,"name":2749,"fn":2750,"description":2751,"org":2909,"tags":2910,"stars":20,"repoUrl":21,"updatedAt":2759},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2911,2912,2913],{"name":2741,"slug":28,"type":15},{"name":2756,"slug":2757,"type":15},{"name":9,"slug":8,"type":15},{"slug":2761,"name":2761,"fn":2762,"description":2763,"org":2915,"tags":2916,"stars":20,"repoUrl":21,"updatedAt":2771},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2917,2918,2919,2920],{"name":2756,"slug":2757,"type":15},{"name":2768,"slug":30,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":2773,"name":2773,"fn":2774,"description":2775,"org":2922,"tags":2923,"stars":20,"repoUrl":21,"updatedAt":2784},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2924,2925,2926,2927],{"name":2756,"slug":2757,"type":15},{"name":2768,"slug":30,"type":15},{"name":2781,"slug":2782,"type":15},{"name":9,"slug":8,"type":15},{"slug":2786,"name":2786,"fn":2787,"description":2788,"org":2929,"tags":2930,"stars":20,"repoUrl":21,"updatedAt":2797},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2931,2932,2933,2934],{"name":2792,"slug":2793,"type":15},{"name":18,"slug":19,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"slug":2799,"name":2799,"fn":2800,"description":2801,"org":2936,"tags":2937,"stars":20,"repoUrl":21,"updatedAt":2813},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2938,2939,2940,2941,2942],{"name":2741,"slug":28,"type":15},{"name":2806,"slug":2807,"type":15},{"name":13,"slug":14,"type":15},{"name":2810,"slug":2811,"type":15},{"name":9,"slug":8,"type":15},{"slug":2815,"name":2815,"fn":2816,"description":2817,"org":2944,"tags":2945,"stars":20,"repoUrl":21,"updatedAt":2830},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2946,2947,2948,2949],{"name":2821,"slug":2822,"type":15},{"name":2824,"slug":2825,"type":15},{"name":9,"slug":8,"type":15},{"name":2828,"slug":2829,"type":15},61]