En bref
Liens d'une occurrence d'erreur PostHog ou des erreurs de session vers des traces OpenTelemetry, des journaux avec le même ID de trace, et Session Replay. Utilisez lorsque l'utilisateur demande des identifiants de trace ou de spread sur une erreur, des journaux de même trace ou des traces de backend pour des erreurs dans une session. Démarre à partir d'un UUID d'événement, d'un ID de session ou d'une URL de problème de suivi des erreurs. Dans le cas d'un diagnostic général ou d'un résumé de rejouer, utilisez l'enquête-questionnaire ou l'enquête-rejouer.
Ce que ça fait
- Trouver l'exception
- Suivez les ID
- Rapporter le résultat
Pour qui, et un exemple
Personnes dont la tâche correspond : Liens d'une occurrence d'erreur PostHog ou des erreurs de session vers OpenTelemetry traces, journaux avec le même identifiant de trace, et Session Replay.
Exemple de demande : « Lier les erreurs aux traces et aux journaux : Liens d'une occurrence d'erreur PostHog ou des erreurs de session vers des traces OpenTelemetry, des journaux avec le même ID de trace, et Session Replay. »
Liens d'une occurrence d'erreur PostHog ou des erreurs de session vers des traces OpenTelemetry, des journaux avec le même ID de trace, et Session Replay. Exemple rédigé par iadujour.fr à partir du SKILL.md, non testé.
Installer
Claude Code : /plugin marketplace add PostHog/skills, puis /plugin install posthog-all@posthog-skills (README).
/plugin marketplace add PostHog/skills/plugin install posthog-all@posthog-skillsFonctionne avec
- Claude Code
Source : README : marketplace Claude Code `/plugin marketplace add PostHog/skills`. D’autres agents ne sont pas nommés.
Niveau : Intermédiaire
Suppose un projet déjà en place chez l’éditeur et les outils décrits dans le SKILL.md.
À savoir
Extrait du SKILL.md
La description d’origine, celle que l’agent lit pour décider de charger la skill (en anglais) :
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 sess […]
Citée depuis le SKILL.md au commit 445764b . Le dossier contient aussi 2 fichiers annexes (references/).
Le SKILL.md compte 68 lignes et 3 sections principales :
- Find the exception
- Follow the IDs
- Report the result
Licence : MIT
Consultée le 13 novembre 2026 : fichier de licence du dépôt.
La licence autorise la reprise : le texte intégral du SKILL.md est reproduit ci-dessous, sans modification, avec sa mention de licence.
Texte intégral du SKILL.md
Reproduit sans modification depuis PostHog/skills (commit 445764b) , © PostHog, sous licence MIT (fichier de licence d’origine ).
Afficher le SKILL.md original (68 lignes, en anglais)
---
name: linking-errors-to-traces
description: >
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.
---
# 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](./references/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
1. **Replay:** If the event has `$session_id`, call
`posthog:session-recording-get` with that ID. `found: false` means no
recording was found; the error or session may still exist. Use
`posthog:generate-app-url` with `/replay/{id}` when a recording exists.
2. **Exact trace:** For each unique, nonzero, 32-character hex `$trace_id`,
call `posthog:apm-trace-get` with that ID and `excludeAttributes: true`.
Use its `_posthogUrl` for 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.
3. **Session trace candidates:** If an event lacks `$trace_id` and the user
asked about session traces, use `posthog:apm-attributes-list` to find a
span attribute that stores the session ID. If a clear key exists, call
`posthog:query-apm-spans` with an exact `span_attribute` filter, a short
window around the error, `flatSpans: true`, and a small `limit`. This finds
matching child spans as well as root spans. Call `posthog:apm-trace-get`
for a candidate that needs a link. Label these as session matches. Time
alone does not prove which request raised the error.
4. **Same-trace logs:** When an event has a trace ID, read
[finding-trace-logs.md](./references/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.
Commentaires.
Un retour d’expérience, une question, une précision sur cette skill ? Les commentaires sont relus avant publication.
Commentaires publiés
Chargement des commentaires…
Laisser un commentaire
Charte de modération. Chaque commentaire est relu avant publication. Sont refusés : l’incitation à la haine, les propos injurieux ou discriminatoires, la publicité, le spam et les liens promotionnels, le hors-sujet et les données personnelles d’autrui.