diagnosing-stacktrace-symbolication
できること
このスキルは、エラーのレポートが、読めない圧縮されたコードやわかりにくいコードを示すときに役立ちます。PostHogが読みやすいファイル名と行番号を表示するように、開発者が設定するための手助けです。
使う場面
- ✓エラーのレポートに、読みやすいファイル名と行番号ではなく、圧縮されたコードの名前が表示されるとき。
- ✓React Native、Android、iOSのエラーのスタックトレースが、読めるコードに戻されないとき。
- ✓ソースマップやシンボルファイルをアップロードしたのに、エラーがまだ読めないとき。
スキルのリンク
https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/diagnosing-stacktrace-symbolication/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“PostHogのJavaScriptのエラーが圧縮されたコードで表示されます。読めるようにするにはどうすればよいですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
ビルドの設定、生成されたシンボルファイル、PostHogへのアップロード、キャプチャされたエラーを、この順番で確認します。ほとんどの問題は、この4つの段階のどれかで起きます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Diagnosing stack-trace symbolication
Symbolication is the cross-platform name for what JavaScript source-map lookup, Hermes function-offset resolution, Proguard / R8 demangling, and dSYM address-to-line lookup all do — turn a minified or obfuscated frame back into a readable file, function, and line.
Work through the user's build and PostHog symbol sets as one pipeline: build config -> generated symbol artifacts (JavaScript source maps, Hermes maps, Proguard mappings, or dSYM bundles) -> uploaded symbol set in PostHog -> captured error frame. Most failures become obvious once those four pieces are checked in order.
Platforms
| Platform | Symbol-data type | Reference |
|---|---|---|
| JavaScript / TypeScript web | source-and-map | javascript.md |
| React Native (Hermes) | hermes | coming soon |
| Android (Proguard / R8) | proguard | coming soon |
| iOS / macOS (dSYM) | apple-dsym | coming soon |
Step 3 of the workflow (symbol-set lookup in PostHog) is identical across platforms — posthog-cli symbol-sets extract handles all four container types. Steps 1, 2, and the platform-specific failure modes live in the
per-platform reference.
Workflow
Step 1 - Find how symbol data is produced and uploaded
Look at the app repo's build scripts and PostHog upload config. Confirm which PostHog package handles the upload
(@posthog/rollup-plugin, @posthog/webpack-plugin, @posthog/nextjs-config, @posthog/nuxt, or direct
posthog-cli) and which directory or asset it processes. See the platform reference for build-tool-specific
config inspection.
For debugging, prefer a build where symbol artifacts remain on disk after upload so you can compare local artifacts against what PostHog received. JavaScript example with the Vite plugin (the platform reference covers the equivalent setting for other build tools):
sourcemaps: {
enabled: true,
deleteAfterUpload: false,
}
Step 2 - Build and inspect local artifacts
Run the production build that uploads symbols, then inspect the emitted files locally. The exact files and helper invocation differ per platform — see the platform reference for the helper command, expected file shape, and common build-time pitfalls (notably empty-mappings false positives that look like upload bugs but are actually bundler config issues).
If local artifacts already look wrong, fix the build before debugging the PostHog upload.
Step 3 - Check symbol sets in PostHog
Look up the symbol set whose ref matches the captured frame's chunk_id using the dedicated MCP tools — they
handle auth, project scoping, and pagination automatically:
posthog:error-tracking-symbol-sets-listwithref=<chunk_id>returns the matching row.posthog:error-tracking-symbol-sets-retrievewith the ID returns the same shape (and confirms permissions).posthog:error-tracking-symbol-sets-download-retrievereturns a one-hour presigned URL pointing at the uploaded symbol-data file. Download it immediately; do not echo the URL back unless the user explicitly asks.
If MCP access is not available, the same data is in Project settings > Error tracking > Symbol sets in the PostHog UI.
Interpret the row:
refmust match the captured framechunk_id.last_usedupdating means PostHog found and loaded that symbol set. It does not guarantee the frame resolved.has_uploaded_file: falsemeans the upload did not complete.- A non-null
failure_reasonmeans PostHog could not parse or load the uploaded symbol data.
The downloaded file is a PostHog symbol-data container (compressed Rust-encoded payload), not plain JSON. Extract
it with posthog-cli:
posthog-cli symbol-sets extract symbolset.bin -o ./extracted
# or, without installing globally:
# npx @posthog/cli symbol-sets extract symbolset.bin -o ./extracted
# bunx @posthog/cli symbol-sets extract symbolset.bin -o ./extracted
posthog-cli symbol-sets extract handles all four symbol-set types (source-and-map, hermes, proguard, dSYM) and
writes the extracted files into the output directory. Once extracted, summarize using the platform reference's
helper.
Step 4 - Compare local, uploaded, and served
よくある質問
どのプラットフォームを扱いますか?
Webのウェブ向けのJavaScriptとTypeScriptは詳しく扱います。React Native、Android、iOSにも触れますが、そのガイドはまだ準備中です。
シンボルセットとは何ですか?
コンパイルされたコードを、元の名前と行番号に戻すために、PostHogにアップロードされるファイルです。
自分のプラットフォームが書かれていない場合はどうなりますか?
他のプラットフォームのガイドは準備中であると伝えられるため、一般的な手順だけが示される場合があります。
詳細
作者による元の説明
Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM). The PostHog symbol-set lookup flow is universal across platforms; build-tool and artifact details live in per-platform references (JavaScript is fleshed out, others come as we encounter them). Use when stack frames stay minified or obfuscated after symbols are uploaded, PostHog symbol sets show last_used but frames are not readable, chunk IDs or dSYM UUIDs do not match, "Token not found" appears, uploade
repo: PostHog/posthog
人気
- GitHubのスター
- 41k
- ランキング
- #6868
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
depot-ci
41kエージェントが、GitHub Actionsの代替であるDepot CIのワークフローを設定し実行できるよう支援します。既存のワークフローの移行や、実行ログの確認も含みます。
depot-container-builds
41kエージェントが、Depotのリモート・ビルダーでDockerイメージを作れるよう支援します。マルチプラットフォームのイメージ、レジストリへのプッシュ、ビルド失敗の修正を含みます。
depot-github-runners
41kエージェントが、GitHub Actionsのジョブを Depot が管理するランナーに移し、ランナーのサイズとラベルを選び、ランナー設定の問題を解決できるよう支援します。
editing-agents-md
41kエージェントが、AGENTS.mdとCLAUDE.mdのどちらにルールを書くべきかを判断し、ファイルを膨らませずに守られやすい形で書けるよう支援します。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。