Diagnosing Missing Recordings

作者 PostHog469d1773e9cb無授權條款收錄於 2026年10月8日更新於 2026年10月8日

Diagnoses why a session recording is missing or was not captured. Use when a user asks why a session has no replay, why recordings aren't appearing, or wants to troubleshoot session replay capture issues for a specific session ID or across their project. Covers SDK diagnostic signals, project settings, sampling, triggers, ad blockers, and quota/billing scenarios.

AI 產生的概覽

診斷 PostHog 工作階段錄影遺失或未被擷取的原因,依據 SDK 診斷訊號與專案設定。

功能
依步驟排查某個工作階段為何沒有重播。先確認錄影是否存在,再從工作階段事件查詢 SDK 診斷屬性,並對照判定清單(錄影存在、被廣告封鎖、已停用、觸發條件未命中、被取樣排除、緩衝為空、上傳被封鎖、未知)解讀訊號;若未提供工作階段 ID,則檢視專案整體模式。最後依判定提出可執行的建議。
適用情境
當使用者詢問某個工作階段為何沒有重播、為何完全沒有錄影,或想針對某個工作階段 ID 或整個專案排查工作階段重播擷取問題時使用。
執行需求
需要 PostHog 工具 posthog:execute-sql、posthog:session-recording-get 與 posthog:query-session-recordings-list,並能存取對應的 PostHog 專案資料。不附帶指令碼,僅為說明文件加三份參考文件。

Diagnosing missing session recordings

When a user asks "why wasn't this session recorded?" or "why don't I have any recordings?", follow this workflow to systematically diagnose the cause.

Available tools

ToolPurpose
posthog:execute-sqlQuery session event properties for diagnostic signals
posthog:session-recording-getCheck if a recording actually exists for the session
posthog:query-session-recordings-listSearch for recordings matching criteria

Diagnostic signals

The PostHog SDK emits diagnostic properties on every event that explain the recording state. See the diagnostic signals reference for the full list.

The key signals are:

  • $has_recording — whether PostHog has a stored recording for this session
  • $recording_status — SDK state: active, buffering, disabled, sampled, paused
  • $session_recording_start_reason — why recording started or didn't
  • $sdk_debug_recording_script_not_loaded — recorder script blocked (ad blocker)
  • $sdk_debug_replay_*_trigger_status — trigger states (URL, event, linked flag)
  • $replay_sample_rate — configured sample rate at capture time

Workflow

Step 1 — Check if the recording exists

If the user provides a session ID, first check whether a recording actually exists:

json
posthog:session-recording-get{  "id": "<session_id>"}

If this returns data, the recording exists — the issue is likely UI/filtering, not capture. If it returns 404, proceed to diagnose why.

Step 2 — Query diagnostic signals from events

Query the most recent event for the session to get SDK diagnostic properties:

sql
posthog:execute-sqlSELECT    properties.$has_recording AS has_recording,    properties.$recording_status AS recording_status,    properties.$session_recording_start_reason AS start_reason,    properties.$sdk_debug_recording_script_not_loaded AS script_not_loaded,    properties.$sdk_debug_replay_url_trigger_status AS url_trigger,    properties.$sdk_debug_replay_event_trigger_status AS event_trigger,    properties.$sdk_debug_replay_linked_flag_trigger_status AS flag_trigger,    properties.$replay_sample_rate AS sample_rate,    properties.$sdk_debug_replay_internal_buffer_length AS buffer_length,    properties.$sdk_debug_replay_flushed_size AS flushed_size,    properties.$lib AS sdk_library,    properties.$lib_version AS sdk_versionFROM eventsWHERE $session_id = '<session_id>'ORDER BY timestamp DESCLIMIT 1

Step 3 — Diagnose the verdict

Use the diagnosis logic reference to interpret the signals. The verdicts in priority order:

  1. Recording exists ($has_recording = true) — recording is captured, issue is elsewhere
  2. Ad blocked (script) ($sdk_debug_recording_script_not_loaded = true) — browser extension blocking the recorder script from loading
  3. Disabled ($recording_status = 'disabled') — replay turned off in settings or SDK config
  4. Trigger pending (trigger statuses are trigger_pending, none matched) — recording gated on trigger that never fired
  5. Sampled out ($session_recording_start_reason = 'sampled_out') — excluded by sample rate
  6. Buffering empty ($recording_status = 'buffering', buffer length = 0, nothing flushed) — initialized but no snapshots produced
  7. Flush blocked (buffer length climbs across events while flushed_size stays at 0) — snapshots are produced but the /s/ ingestion endpoint is blocked by an ad blocker or misconfigured reverse proxy. Detecting this requires querying the trend across the session's events — see example 3 in examples.md
  8. Unknown — signals don't match a known pattern

Step 4 — Check project-level settings (if no session ID)

When the user asks about recordings missing project-wide (no specific session), query for recent sessions to check the pattern:

sql
posthog:execute-sqlSELECT    $session_id,    properties.$recording_status AS recording_status,    properties.$session_recording_start_reason AS start_reason,    properties.$sdk_debug_recording_script_not_loaded AS script_not_loaded,    properties.$replay_sample_rate AS sample_rateFROM eventsWHERE event = '$pageview'    AND timestamp > now() - INTERVAL 1 DAYGROUP BY    $session_id,    recording_status,    start_reason,    script_not_loaded,    sample_rateORDER BY max(timestamp) DESCLIMIT 10

Look for patterns:

  • All disabled → replay is turned off in project settings
  • All sampled_out with low sample rate → sample rate too aggressive
  • All script_not_loaded → likely a CSP or deployment issue, not just one user's ad blocker
  • Mix of statuses → per-session issue, dig into specifics

Step 5 — Provide actionable recommendations

Based on the verdict, recommend specific actions:

VerdictRecommendation
Ad blockedUser's browser extension is blocking rrweb. Suggest trying without ad blocker, or using a proxy/custom domain for the recorder script
DisabledCheck project replay settings — recording may be turned off. Link to Settings > Session replay
Trigger pendingThe configured trigger (URL pattern, event, or feature flag) never matched. Review trigger configuration
Sampled outIncrease the sample rate in project settings, or use a trigger to guarantee capture for important sessions
Buffering emptyPage closed before first snapshot. Common with very short sessions or single-page navigations. Consider lowering minimum duration
UnknownDirect user to troubleshooting docs: https://posthog.com/docs/session-replay/troubleshooting

Examples

See real-world diagnostic examples showing how signal combinations map to verdicts. Use these to calibrate your interpretation of query results.

Tips

  • If $lib_version is very old, some diagnostic signals won't be present. Note this to the user — upgrading the SDK will provide better diagnostics.
  • A session might have events but no recording if the recording was deleted due to retention. Check the session's timestamp against the project's retention period.
  • If $has_recording is true but the user can't find it, check if it's filtered out by duration, activity threshold, or playlist filters.

Related skills

  • diagnosing-sdk-health — an outdated SDK is a common root cause and blunts the diagnostic signals
  • finding-sessions-to-watch — once capture works, pick the sessions worth watching
  • investigating-replay — analyze the recording once it exists

來源與署名

來源:PostHog/ai-plugin位於skills/diagnosing-missing-recordings提交469d177

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 PostHog/ai-plugin 的技能

Writing Simplified Technical English

PostHog

套用 ASD-STE100 簡化技術英語規則,讓代理撰寫的文字語意明確、方便執行。

Writing & Content2026年10月8日

Working With Task Comments

PostHog

透過 PostHog MCP exec 調度器讀取並解讀 PostHog 任務、成品和畫布上的留言。

Productivity & Workflow2026年10月8日

Working With Skills

PostHog

指導代理使用 PostHog 的 skill-* MCP 工具來探索、讀取、建立、更新與重構技能。

AI & Agents2026年10月8日

Working With Scouts

PostHog

說明如何把監看工作委派給 PostHog Signals 偵察代理、處理其回報,並長期調校整個代理團隊的操作手冊。

AI & Agents2026年10月8日

Validating And Publishing Canvases

PostHog

Validate and publish a canvas source project safely: the source-project shape, declared capabilities, reading the current version pointer, iterating on validation diagnostics, guarded publishing with expected_current_version_id, staging a draft build and promoting it, waiting out the queued build, and recovering from a 409 version_conflict or a 429 capacity limit without overwriting concurrent work. Use whenever a canvas edit is ready to save, a draft build is wanted, a canvas publish or build returns diagnostics or a conflict, or a task needs to understand canvas version history.

待分類2026年10月8日

Understanding Billing Usage

PostHog

Explains PostHog billing usage and spend from the customer's visible Billing MCP tools. Use when the user asks why usage or spend is high, which product or project is driving usage, what a usage type means, how to reduce usage, what changed over time, why they got a usage change alert, or whether a spike/drop alert was real or noisy. Also use before product-specific analytics skills when the user names a billable PostHog product metric such as events, recordings, feature flag requests, exceptions, survey responses, synced rows, logs, AI events, AI credits, or Inbox credits. Starts from Billing usage/spend tools, then routes to customer-visible product MCP surfaces for deeper investigation.

待分類2026年10月8日