Six WebRTC getStats Mistakes to Avoid

https://hackernoon.imgix.net/images/12DImwrGTGci5EYZczBUF1SL7yv2-88a3bzw.png

A broken monitoring dashboard is relatively easy to catch. A dashboard showing believable but incorrect numbers is much more dangerous.

That is one of the traps with WebRTC's getStats() API.

In my work on real-time communication systems, I have used WebRTC statistics to investigate connection quality, recovery behavior, and production reliability. One recurring problem is that a metric can be collected correctly yet still be misinterpreted.

The API exposes detailed information about RTP streams, packet loss, jitter, candidate pairs, codecs, frame processing, round-trip time, and more. But those values do not all behave the same way. Some are cumulative counters. Some are instantaneous measurements. Some depend on information reported by the remote endpoint. Some disappear when the monitored object changes.

If those distinctions are ignored, the calculations can still produce perfectly reasonable-looking numbers.

A bitrate graph keeps moving. Packet loss stays near zero. Jitter looks excellent. Nothing crashes.

The numbers...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more