klaridian()
How-to guidesPlugins

OpenTelemetry

Trace every tool call without writing instrumentation code.

Enable it

npx klaridian generate --spec ./api.yaml --out ./my-server --plugin otel

Every tool call gets wrapped in a trace span automatically. You don't write any tracing code.

How traces are sent

Traces always go through the standard OTLPTraceExporter, and diagnostic logs go to stderr, never stdout. This matters: writing to stdout would corrupt the server's communication with its client.

Point it at your backend

The generated server reads standard OpenTelemetry environment variables—no klaridian-specific config:

OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.your-backend.example \
OTEL_EXPORTER_OTLP_HEADERS="api-key=..." \
node dist/src/index.js

This works with Datadog, Grafana Tempo, Honeycomb, or any backend that accepts standard OTLP.

On this page