linking-errors-to-traces
Fungsinya
Skill ini menautkan sebuah error ke trace backend, log, dan rekaman sesi yang memiliki ID yang sama. Ditujukan untuk pengembang yang ingin mengikuti sebuah masalah dari sisi front end hingga ke server.
Kapan dipakai
- ✓Saat Anda ingin trace atau ID span untuk satu kejadian error tertentu.
- ✓Saat Anda memerlukan log backend yang memiliki trace ID yang sama dengan error.
- ✓Saat Anda ingin melihat session replay dan trace backend untuk error dalam satu sesi.
Link skill
https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/linking-errors-to-traces/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Temukan trace dan log backend yang terkait dengan kejadian error ini, agar saya bisa melihat apa yang dilakukan server.”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill mulai dari error atau ID sesi, mengikuti trace ID bersama ke span dan log yang cocok, lalu memeriksa session replay. Skill hanya menautkan catatan yang memiliki ID bersama, bukan catatan yang kebetulan terjadi pada waktu yang mirip.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Link errors to traces and logs
Use a shared ID to connect records. A matching service and time do not prove that a log or span belongs to an error.
Find the exception
For an issue ID or URL, call posthog:query-error-tracking-issue-events with
include: ["exception", "correlation"], filterTestAccounts: false, and a small
limit. Choose one occurrence unless the user asks for several. Say when the
result is a sample.
For an occurrence ID or session ID, read finding-exceptions.md for the exact lookup. Use the user's time range when given. If no event appears, state the window you checked. Do not claim that an event never existed based on a bounded search.
Follow the IDs
- Replay: If the event has
$session_id, callposthog:session-recording-getwith that ID.found: falsemeans no recording was found; the error or session may still exist. Useposthog:generate-app-urlwith/replay/{id}when a recording exists. - Exact trace: For each unique, nonzero, 32-character hex
$trace_id, callposthog:apm-trace-getwith that ID andexcludeAttributes: true. Use its_posthogUrlfor the trace link. If the event has$span_id, compare it with returned span IDs as hex, ignoring case. An empty result means no retained span was found for that trace ID. Logs may still exist. - Session trace candidates: If an event lacks
$trace_idand the user asked about session traces, useposthog:apm-attributes-listto find a span attribute that stores the session ID. If a clear key exists, callposthog:query-apm-spanswith an exactspan_attributefilter, a short window around the error,flatSpans: true, and a smalllimit. This finds matching child spans as well as root spans. Callposthog:apm-trace-getfor a candidate that needs a link. Label these as session matches. Time alone does not prove which request raised the error. - Same-trace logs: When an event has a trace ID, read
finding-trace-logs.md for the bounded
service lookup and exact log filter. Include every severity, including
info. A trace can have logs even when no span was retained.
Use posthog:generate-app-url with /error-tracking/{id} when the issue ID is known.
Do not build PostHog links by hand.
Report the result
For each checked occurrence, show the error time, IDs used for the join, and links to the issue, replay, and retained trace when available. Summarize matching logs with their time and severity. Exclude secrets and unneeded personal data from log excerpts.
Name each gap separately: no trace ID on the event, trace ID but no retained span, no session attribute on spans, no recording, or no logs with that trace ID in the checked window. A session-matched span is a candidate until an exact trace or span ID connects it to the error. State any row limit or time range that kept the search from being complete. If a lookup fails, say that its result is unknown instead of reporting that no matching data exists.
Pertanyaan umum
Mengapa perlu ID bersama?
Pencocokan hanya berdasarkan layanan dan waktu dapat menautkan catatan yang salah, sehingga skill mewajibkan trace ID bersama.
Bagaimana jika tidak ada trace yang ditemukan?
Skill melaporkan jendela waktu yang dicari. Log mungkin tetap ada meskipun tidak ada span yang ditemukan.
Bisakah memberikan diagnosis umum?
Tidak. Untuk diagnosis umum atau ringkasan replay, digunakan skill investigasi error lainnya.
Detail
Deskripsi asli dari pembuat
Links a PostHog error occurrence or session's errors to OpenTelemetry traces, logs with the same trace ID, and Session Replay. Use when the user asks for trace or span IDs on an error, same-trace logs, or backend traces for errors in a session. Starts from an occurrence UUID, session ID, or error tracking issue URL. For a general issue diagnosis or replay summary, use investigating-error-issue or investigating-replay.
repo: PostHog/posthog
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6871
- Lisensi
- —
- Diperbarui
- 2/11/2026
Komentar
- …
Skill lain dari repositori ini
depot-ci
41kMembantu agent Anda menyiapkan dan menjalankan alur kerja Depot CI, alternatif GitHub Actions, termasuk memigrasikan alur kerja yang ada dan membaca log eksekusi.
depot-container-builds
41kMembantu agent Anda membangun image Docker di builder jarak jauh Depot, termasuk image multi-platform, pengiriman ke registry, dan perbaikan kegagalan build.
depot-github-runners
41kMembantu agent Anda memindahkan job GitHub Actions ke runner yang dikelola Depot, memilih ukuran dan label runner, serta memecahkan masalah pengaturan runner.
editing-agents-md
41kMembantu agent Anda memutuskan apakah sebuah aturan layak masuk ke berkas AGENTS.md atau CLAUDE.md, dan menulisnya agar tetap dipatuhi tanpa membuat berkas membengkak.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.