refined-hydrogen-81988
12/04/2025, 10:28 PMtall-airline-16756
12/04/2025, 10:29 PMtall-airline-16756
12/04/2025, 10:29 PMset_tracer_provider() wasn’t called or wasn’t set early enough, so some spans use a different provider.
• You’re creating spans manually (LLM, TTS, STT, tool calls) outside the framework’s context propagation, so they aren’t linked to the AgentSession parent span.
Quick checks I can guide you through
1. Did you call set_tracer_provider() at the very start of the session/process?
2. Are your LLM/TTS/STT/tool calls running in async tasks or separate threads? (If yes, context propagation is likely the issue.)
3. Do you create any manual spans outside the Agents framework? If so, are you passing the current context when starting them?
If you want, share:
• the language/runtime (Python?),
• a small code snippet around tracer setup and where you call LLM/TTS/STT/tool calls (or describe whether they run in async tasks), and
• one example trace ID or timestamps (if available).
I can then point to the exact places to attach/propagate context or show a minimal code change (based on the langfuse trace example) to keep all spans under one trace. Would you like that?
Sources: Observability data hooks | LiveKit docs | Agents (Python) | livekit/livekit_composite | DeepWiki | Agent insights in LiveKit Cloud | LiveKit docs | Building Multi-Agent Architectures with LiveKit Agents