linking-errors-to-traces
Что он делает
Этот скилл связывает ошибку с серверной трассировкой, логами и записью сессии, которые имеют тот же ID. Он предназначен для разработчиков, которые хотят проследить проблему от фронтенда до сервера.
Когда использовать
- ✓Когда вам нужен ID трассировки или спана для конкретного случая ошибки.
- ✓Когда нужны серверные логи, которые имеют общий с ошибкой ID трассировки.
- ✓Когда вы хотите увидеть повтор сессии и серверные трассировки для ошибок в одной сессии.
Ссылка на скилл
https://github.com/PostHog/posthog/blob/master/products/error_tracking/skills/linking-errors-to-traces/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Найди серверную трассировку и логи, которые относятся к этому случаю ошибки, чтобы я увидел, что делал сервер.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Скилл начинает с ошибки или ID сессии, следует по общему ID трассировки к совпадающим спанам и логам и проверяет повтор сессии. Он связывает только записи с общим ID, а не записи, которые просто случились в похожее время.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с 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.
Частые вопросы
Зачем нужен общий ID?
Сопоставление только по сервису и времени может связать не те записи, поэтому скилл требует общий ID трассировки.
Что если трассировка не найдена?
Скилл сообщит, в каком временном окне искал. Логи могут существовать, даже если спан не найден.
Может ли он дать общий диагноз?
Нет. Для общего диагноза или сводки повтора используются другие скиллы расследования ошибок.
Подробности
Оригинальное описание автора
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
Популярность
- Звёзды на GitHub
- 41k
- Место в рейтинге
- #6871
- Лицензия
- —
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
depot-ci
41kПомогает агенту настроить и запускать workflow в Depot CI, альтернативе GitHub Actions, включая перенос существующих workflow и чтение логов запусков.
depot-container-builds
41kПомогает агенту собирать Docker-образы на удалённых сборщиках Depot, включая мультиплатформенные образы, отправку в реестры и исправление ошибок сборки.
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Помогает агенту открыть и запустить приложение на временной облачной машине, а затем показать его вид на боковой панели чата.