What problem does it solve?
Debugging slow requests and errors across distributed services requires digging through large OpenTelemetry trace payloads, which are hard to navigate manually. This Skill provides a structured workflow for querying PostHog APM span data, reconstructing trace trees, and pinpointing latency bottlenecks and error spans.
Core Features & Use Cases
- Trace retrieval and tree reconstruction: Fetch a full trace by hex trace ID and rebuild the parent-child span tree with DFS-indented timeline scripts.
- Latency and error analysis: Sort spans by self_time_nano to find where wall-clock time went, list error spans with status_code 2, and read exception details from span attributes.
- Trend and distribution queries: Use sparkline, duration histogram, and attribute breakdown MCP tools to detect error-rate spikes and slow trace populations.
- Use Case: A user reports the checkout API is slow. Query spans filtered to the checkout service, fetch the slowest trace, run print_summary.py to see the top-5 slowest spans, and surface the _posthogUrl deep link so the team can inspect the trace in the PostHog UI.
Quick Start
Ask the assistant to fetch and summarize the PostHog APM trace for a given trace ID and identify its slowest and error spans.