Telemetry
Tracing, spans, events, and logs to any connector.
Tracing, instrumentation, and logging are first-class in Yoke. A list of
ObservabilityConnectors all implement one interface; the runtime sends
everything — spans for agent turns, tool calls, and events, plus logs — to all
of them.
const runtime = Runtime({
observability: [otelConnector, myLogger],
});The connector interface
interface ObservabilityConnector {
name: string;
emit(event: TraceEventData | TraceSpanData | TraceLogData): void | Promise<void>;
}Connectors receive spans, events, and logs. Write one to send telemetry to any backend — logging systems, dashboards, APM vendors, whatever you use.
OpenTelemetry
The official connector is OtelConnector, built on @opentelemetry/api
only. The host supplies the OTel SDK and exporters via the global tracer
provider, which makes it OpenTelemetry-compatible out of the box:
import { OtelConnector } from "yoke";
const connector = new OtelConnector();
const runtime = Runtime({ observability: [connector] });What gets emitted
- Spans for agent turns and tool calls (with durations and results).
- Events for the runtime's standard events and app events.
- Logs from the runtime.
Because observability accepts a list, you can fan out to multiple sinks at
once — OpenTelemetry for tracing and a simple logger for development.