root-cause-analysis

Installation
SKILL.md

Root Cause Analysis with Kopai

Guide for debugging production issues using telemetry data (traces, logs, metrics) via Kopai CLI.

Prerequisites

Ensure access to Kopai app backend. Make sure the services are set up to send their OpenTelemetry data to Kopai. See otel-instrumentation skill for setup.

RCA Workflow

  1. Find error tracesnpx @kopai/cli traces search --status-code ERROR --limit 20 --json. If empty: broaden time range, check service name, or search logs with --severity-min 17
  2. Get full trace contextnpx @kopai/cli traces get <traceId> --json. Check Duration, StatusCode, and span hierarchy for bottlenecks
  3. Correlate logsnpx @kopai/cli logs search --trace-id <traceId> --json. Look for error messages, stack traces, and timestamps
  4. Check metricsnpx @kopai/cli metrics discover --json then npx @kopai/cli metrics search --type <type> --name <name> --json for anomalies
  5. Present findings — summarize root cause with evidence (specific traceIds, log entries, metric anomalies), impact, and suggested fix

Quick Example

Related skills
Installs
23
GitHub Stars
3
First Seen
Jan 27, 2026