Hi team! :wave: I'm using LiveKit Agents (v1.3....
# agents
k
Hi team! 👋 I'm using LiveKit Agents (v1.3.5) with Langfuse via OpenTelemetry integration, and I noticed that STT-related spans are not appearing in my traces. I can see these spans being recorded correctly: -
llm_node
,
llm_request
,
llm_request_run
✅ -
tts_node
,
tts_request
,
tts_request_run
✅ -
agent_turn
,
function_tool
, etc. ✅ But there's no
stt_node
or
stt_request
span. I checked the SDK source and found that
llm.py
and
tts.py
have
tracer.start_as_current_span()
calls, but
stt.py
doesn't seem to have any tracing code. My questions: 1. Is this expected behavior? Or am I missing some configuration to enable STT tracing? 2. If intentional, what's the reasoning? Is STT considered less important for observability? 3. Is there a workaround to get STT latency/duration in OpenTelemetry traces? Thanks in advance! 🙏
l
Hi, this is intentional, for reasoning, please see the response in this issue: https://github.com/livekit/agents/issues/4246
For workarounds, others might have a better suggestion, but my first thought is to capture the transcription delay like this demo does, https://github.com/livekit-examples/dev-day-demos/blob/main/model-battleground/battleground-agent/src/agent.py#L147, and send that as its own span (but I haven't tried it)