@kartha-health/otel
v0.1.0
Published
OpenTelemetry adapter for @kartha-health/agent telemetry — maps loop spans to the OTel GenAI semantic conventions.
Readme
@kartha-health/otel
Optional OpenTelemetry adapter for the Kartha Health Agent SDK — maps the
@kartha-health/agent loop spans (session / turn / llm.call / tool.call)
to the OTel GenAI semantic conventions. You own the TracerProvider and
exporter; the adapter only creates spans.
npm install @kartha-health/otel @opentelemetry/apiimport { KarthaOtelTelemetry } from "@kartha-health/otel";
const runtime = new Runtime({
// …
telemetry: new KarthaOtelTelemetry({
tracerName: "kartha-health", // default
captureContent: false, // default — no prompt/completion content
}),
});Attributes follow gen_ai.* (model, token usage, finish reasons) plus kartha.*
(cost, latency, cache tokens, session/agent/skill ids). Content capture is off
by default and double-gated — turning it on can route PHI into span events, so
the exporter must stay inside your PHI boundary.
- Runtime: ESM, Node ≥ 20 · Depends on:
@kartha-health/agent· Peer:@opentelemetry/api - License: Apache-2.0
