narrow-address-68686
07/22/2025, 9:47 AMtall-airline-16756
07/22/2025, 9:48 AMtall-airline-16756
07/22/2025, 9:48 AMmetrics_collected event on the AgentSession to receive metrics in real time.
• Metrics include LLM (latency, time to first token, token usage), STT (audio duration, transcript time), TTS, and VAD performance data.
• To aggregate metrics across a session, use the UsageCollector class.
• For conversation latency, you can calculate total latency using: total_latency = eou.end_of_utterance_delay + llm.ttft + tts.ttfb
• OpenTelemetry integration is available for advanced trace-based observability.
• You can also process and forward metrics to external systems for custom analysis.
These tools allow you to monitor and optimize agent performance in real time, providing comprehensive insights into latency and other key metrics.
Let me know if you need code examples or details on a specific metric type.
Sources: Capturing metrics | LiveKit Docs | metrics/send-metrics-to-3p/metrics_server/README.md | Logs, metrics, and telemetry | LiveKit Docs