CtrlK
BlogDocsLog inGet started
Tessl Logo

kopai/otel-instrumentation

Instrument applications with the OpenTelemetry SDK and prove the telemetry is good by validating it against a local Kopai backend. Use when setting up observability, adding tracing/logging/metrics, deciding what to instrument or which attributes to add, retrofitting OTel into an existing codebase, threading context through call chains, configuring sampling, 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". Do NOT use to investigate existing telemetry for a root cause (use root-cause-analysis), to build dashboards (use create-dashboard), or to instrument LLM and agent calls (use otel-genai-instrumentation).

Quality

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

troubleshoot-wrong-port.mdreferences/

titleimpacttags
Wrong PortMEDIUMtroubleshoot, port

Wrong Port

Kopai runs two servers, and sending telemetry to the wrong one produces silence rather than an error.

PortServiceDirection
4318OTEL collectorYour app sends telemetry here (OTLP/HTTP)
8000API serverThe CLI and SDK read data from here
# WRONG — the API server does not accept OTLP
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:8000

# CORRECT
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318

Port 4317 is also wrong: that is the conventional gRPC port, and Kopai is HTTP-only. A Go or Java SDK left on its default will try it — setup-environment.md covers forcing OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf.

Verify both ends

# collector accepts OTLP
curl -s -o /dev/null -w '%{http_code}\n' -X POST http://localhost:4318/v1/traces \
  -H 'Content-Type: application/json' -d '{"resourceSpans":[]}'

# API server answers queries
curl -s http://localhost:8000/signals/traces | head -c 200

Check the endpoint in the shell that launched the app. A correction exported afterwards never reaches the running process — restart it.

references

_sections.md

architectural-patterns.md

attributes.md

cli-reference.md

context-propagation.md

custom-instrumentation.md

drive-traffic.md

instrument-attributes.md

instrument-errors.md

instrument-spans.md

lang-cpp.md

lang-dotnet.md

lang-erlang.md

lang-fastify.md

lang-go.md

lang-java.md

lang-nextjs.md

lang-nodejs.md

lang-php.md

lang-python.md

lang-ruby.md

lang-rust.md

layered-telemetry.md

nextjs-examples.md

otel-docs.md

sampling.md

setup-backend.md

setup-environment.md

troubleshoot-missing-attrs.md

troubleshoot-missing-spans.md

troubleshoot-no-data.md

troubleshoot-wrong-port.md

validate-logs.md

validate-metrics.md

validate-shutdown.md

validate-traces.md

CHANGELOG.md

SKILL.md

tile.json