linking-errors-to-traces
ما الذي تفعله
تربط هذه المهارة خطأً بتتبع الخادم وسجلاته وتسجيل الجلسة الذين يشتركون في معرّفه. وهي مناسبة للمطورين الذين يريدون تتبع مشكلة من الواجهة الأمامية إلى الخادم.
متى تستخدمها
- ✓عندما تريد معرّف التتبع أو الامتداد (span) لحدوث خطأ محدد.
- ✓عندما تحتاج إلى سجلات الخادم التي تشترك في معرّف تتبع مع الخطأ.
- ✓عندما تريد رؤية تسجيل الجلسة وتتبعات الخادم للأخطاء في جلسة واحدة.
رابط المهارة
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 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تبدأ المهارة من معرّف خطأ أو جلسة، وتتبع معرّف التتبع المشترك إلى الامتدادات والسجلات المطابقة، ثم تفحص تسجيل الجلسة. وهي لا تربط إلا السجلات التي تشترك في معرّف، لا السجلات التي تحدث في وقت قريب فقط.
المحتوى التقني (ملف 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.
الأسئلة الشائعة
لماذا تحتاج إلى معرّف مشترك؟
المطابقة بالخدمة والوقت وحدهما قد تربط سجلات خاطئة، لذلك تشترط المهارة معرّف تتبع مشتركاً.
ماذا لو لم يُعثر على أي تتبع؟
تُبلغ المهارة عن نافذة الوقت التي بحثت فيها. قد توجد السجلات حتى إن لم يُعثر على أي امتداد.
هل تستطيع تقديم تشخيص عام؟
لا. للتشخيص العام أو ملخص التسجيل، تُستخدم مهارات تحقيق أخرى في الأخطاء.
التفاصيل
الوصف الأصلي من المؤلف
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
- الترخيص
- —
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
depot-ci
41kيساعد وكيلك على إعداد سير عمل Depot CI وتشغيله، وهو بديل لـ GitHub Actions، بما في ذلك نقل سير العمل الحالي وقراءة سجلات التشغيل.
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يساعد وكيلك على فتح تطبيق وتشغيله على جهاز سحابي مؤقت، ثم عرض واجهته في الشريط الجانبي للدردشة.