Analyze telemetry data for root cause analysis using Kopai CLI. Use when debugging errors, investigating latency issues, tracing request flows across services, or correlating logs with traces. Also use when users report production issues like "why is my API slow", "getting 500 errors", "service is down", "requests are timing out", or any symptom that needs telemetry-based investigation — even if they don't mention traces or observability explicitly.
100
100%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
| title | impact | tags |
|---|---|---|
| Pattern: Slow Requests | HIGH | pattern, latency, performance |
Impact: HIGH
Diagnose slow request latency issues.
# 1. Find slow traces (>1s = 1000000000 ns)
npx @kopai/cli traces search --duration-min 1000000000 --json
# 2. Analyze span breakdown
npx @kopai/cli traces get <traceId> --fields SpanName,Duration,ParentSpanId --json
# 3. Check for database/external calls
npx @kopai/cli traces search --trace-id <traceId> --span-kind CLIENT --json| Duration (ns) | Human |
|---|---|
| 1000000 | 1ms |
| 100000000 | 100ms |
| 1000000000 | 1s |
| 5000000000 | 5s |