OpenTelemetry tracing

Saaya is OpenTelemetry-native. Every session emits a span tree covering routing, STT, LLM, tool calls, and TTS. We propagate W3C trace context inbound and outbound, so a session you started from your app shows up as a single trace across your services and ours.

Spans we emit

  • `saaya.session`, the root span for a conversation, with channel + agent attributes.
  • `saaya.stt.transcribe`, one span per partial / final transcript segment.
  • `saaya.llm.complete`, model name, token counts, latency, finish reason.
  • `saaya.tool.call`, tool name, input hash, retries, status.
  • `saaya.tts.synthesize`, TTS provider, voice, character count.
  • `saaya.kb.retrieve`, KB id, query, retrieved chunk count, score.

Propagation

Pass `traceparent` and `tracestate` headers on any Saaya API call and we will continue the trace. Webhooks Saaya sends out also carry `traceparent` so your handler can extend the trace into your downstream pipeline.

Exporters

Configure an OTLP endpoint in `Settings → Observability → OpenTelemetry`. Saaya pushes traces to it directly, Honeycomb, Grafana Tempo, Datadog, New Relic, and Lightstep are tested. For lower-volume orgs we also support a built-in Saaya viewer.

otlp-config.json
{
  "endpoint": "https://api.honeycomb.io",
  "headers":  { "x-honeycomb-team": "{{secrets.HC_KEY}}" },
  "protocol": "grpc",
  "sampling": { "ratio": 0.1, "alwaysSampleErrors": true }
}

Sampling

Production volumes can be expensive at 100% sampling. Default to 10% with `alwaysSampleErrors: true`, errors and high-latency sessions stay 100% sampled, the rest is ratio-sampled.
Was this page helpful?