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
Guide for debugging production issues using telemetry data (traces, logs, metrics) via Kopai CLI.
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.
npx @kopai/cli traces search --status-code ERROR --limit 20 --json. If empty: broaden time range, check service name, or search logs with --severity-min 17npx @kopai/cli traces get <traceId> --json. Check Duration, StatusCode, and span hierarchy for bottlenecksnpx @kopai/cli logs search --trace-id <traceId> --json. Look for error messages, stack traces, and timestampsnpx @kopai/cli metrics discover --json then npx @kopai/cli metrics search --type <type> --name <name> --json for anomalies# Find failing requests
npx @kopai/cli traces search --status-code ERROR --service payment-api --json
# Get trace details (copy traceId from above)
npx @kopai/cli traces get abc123def456 --json
# Check correlated logs
npx @kopai/cli logs search --trace-id abc123def456 --severity-min 17 --jsonworkflow-find-errors - Find Error Tracesworkflow-get-context - Get Full Trace Contextworkflow-correlate-logs - Correlate Logs with Traceworkflow-check-metrics - Check Related Metricsworkflow-identify-cause - Identify Root Cause & Present Findingspattern-http-errors - HTTP Error Debuggingpattern-slow-requests - Slow Request Analysispattern-distributed - Distributed Failure Tracingpattern-log-driven - Log-Driven InvestigationRead rules/<rule-name>.md for details.
--json for programmatic analysisjq for filtering/aggregation--severity-min 17 instead of --severity-text ERROR to catch all error-level logs regardless of text casing. Fall back to --body "error" for errors logged at INFO or with no severity.d5894e9
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.