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: HTTP 500 Errors | HIGH | pattern, http, 500, errors |
Impact: HIGH
Diagnose HTTP 500 internal server errors.
# 1. Find failed HTTP spans
npx @kopai/cli traces search --status-code ERROR --span-attr "http.status_code=500" --json
# 2. Get trace details
npx @kopai/cli traces get <traceId> --json
# 3. Check error logs
npx @kopai/cli logs search --trace-id <traceId> --severity-text ERROR --json| Attribute | Purpose |
|---|---|
| http.status_code | HTTP response code |
| http.route | Endpoint that failed |
| error.message | Error description |
| exception.type | Exception class |