WebRTC Metrics

A comprehensive overview of WebRTC statistics, derived calculations, extracted features, and observable signals, to better understand call quality, connectivity, and user experience in rtcStats

Back
connectionerrorssdpicedebugging

Connection API failures (feature)

SDP and ICE API errors that break a call before media, captured as the error message of the first failed call of each kind.

Description

Connection-level features, extracted per RTCPeerConnection into features_connection.

These features capture the error message of the first failed call of each kind. They are null when the call never failed:

  • addIceCandidateFailure - error message from the first failed addIceCandidate call.
  • setLocalDescriptionFailure - error message from the first failed setLocalDescription call.
  • setRemoteDescriptionFailure - error message from the first failed setRemoteDescription call.

Extracted by the open-source rtcstats-features package into your own database.

Why it matters

These are the failures that kill a call before any media flows. A rejected setRemoteDescription means the two ends could not agree on SDP: a codec mismatch, a malformed offer, or an SDP munging bug in your own code. An addIceCandidate failure means candidates arrived that the peerconnection could not use, often a signaling ordering problem. Because the error string is preserved, you can group failures by message and see whether one class of bug dominates. That turns a vague "some calls do not connect" into a ranked list of concrete SDP and ICE errors to fix.

SQL example

Rank connections by failure type and the specific error string:

SELECT
  connection.set_remote_description_failure AS error_message,
  COUNT(*) AS occurrences
FROM features_connection AS connection
WHERE connection.set_remote_description_failure IS NOT NULL
GROUP BY connection.set_remote_description_failure
ORDER BY occurrences DESC;

Related features

  • Offer/answer timing - how long the same setLocalDescription and setRemoteDescription calls took when they did succeed.

See also