skills/otel-instrumentation/SKILL.md
Instrument applications with OpenTelemetry SDK and validate telemetry using Kopai. Use when setting up observability, adding tracing/logging/metrics, testing instrumentation, debugging missing telemetry data, or when traces/logs/metrics aren't appearing after setup. Also use when users say things like "my traces aren't showing up", "I don't see any data", or "how do I add observability to my app".
npx skillsauth add kopai-app/kopai-mono otel-instrumentationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guide for instrumenting applications with OpenTelemetry SDK and validating telemetry locally using Kopai.
# Start backend
npx @kopai/app start
# Configure app
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
export OTEL_SERVICE_NAME=my-service
# Validate telemetry
npx @kopai/cli traces search --service my-service --json
npx @kopai/cli logs search --service my-service --json
npx @kopai/cli metrics discover --json
npx @kopai/app startOTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 and OTEL_SERVICE_NAME=<name>npx @kopai/cli traces search --service <name> --json. If empty: check endpoint/port, verify app is running and generating traffic, wait 10-30s and retrynpm install @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node @opentelemetry/api
Create instrumentation.mjs:
import { NodeSDK } from "@opentelemetry/sdk-node";
import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentations-node";
const sdk = new NodeSDK({ instrumentations: [getNodeAutoInstrumentations()] });
sdk.start();
Run: node --import ./instrumentation.mjs server.mjs
setup-backend - Start Kopai Backendsetup-environment - Configure Environmentlang-nodejs - Node.js Instrumentationlang-nextjs - Next.js Instrumentationlang-python - Python Instrumentationlang-go - Go Instrumentationlang-java - Java Instrumentationlang-dotnet - .NET Instrumentationlang-ruby - Ruby Instrumentationlang-php - PHP Instrumentationlang-rust - Rust Instrumentationlang-erlang - Erlang/Elixir Instrumentationlang-cpp - C++ Instrumentationvalidate-traces - Validate Tracesvalidate-logs - Validate Logsvalidate-metrics - Validate Metricstroubleshoot-no-data - No Data Receivedtroubleshoot-missing-spans - Missing Spanstroubleshoot-missing-attrs - Missing Attributestroubleshoot-wrong-port - Wrong PortRead rules/<rule-name>.md for details.
tools
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.
development
Create observability dashboards from OTEL metrics, logs, and traces using Kopai. Use when building metric visualizations, monitoring views, KPI panels, or when the user wants to see their telemetry data in a dashboard — even if they don't say "dashboard" explicitly. Also use when other skills or workflows need to present telemetry data visually (e.g. after root cause analysis).
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.