stale-vase-84095
08/02/2025, 9:53 PMtall-airline-16756
08/02/2025, 9:53 PMtall-airline-16756
08/02/2025, 9:53 PMdur_call_sec metric provided by LiveKit's monitoring system. This metric tracks SIP call durations in seconds and is available for both inbound and outbound calls.
Here’s how you can access it:
• Use Prometheus to query the dur_call_sec metric.
• Filter the metric by the dir label, setting it to "in" for inbound calls.
• For example, you can use a query like: `dur_call_sec_bucket{dir="in", le="10"}`Adjust the le parameter to match the desired duration bucket.
Let me know if you need further assistance with this!
Sources: pkg/stats/monitor.gotall-airline-16756
08/02/2025, 9:56 PMDataPacket objects while the call is happening.
• Server-Side Metrics: On the server side, these metrics arrive via data channels. You can set up listeners or hooks to grab and work with them.
• Agent-Specific Metrics: You can subscribe to the metrics_collected event to keep track of metrics related to LLM, TTS, and STT data. The UsageCollector class is super handy for getting session summaries.
• Custom Data Access: If you want the raw metrics during the call, you can add some logic to intercept and decode those DataPacket objects or use protobuf structures defined in LiveKit's protocol buffers.
If you need even more metrics, you can always fetch them later using session or call IDs. Check out the LiveKit Metrics Documentation for some great examples and guidance.
Feel free to reach out if you want a hand with any of these steps—I’m here to help!tall-airline-16756
08/02/2025, 9:59 PM