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
Gathered and added candidates (feature)
Boolean flags for which ICE candidate types were gathered locally versus added from the remote end, a fast read on connectivity coverage.
Description
Connection-level features, extracted per RTCPeerConnection into features_connection.
These features record which candidate type appeared, as booleans. One group covers candidates gathered locally, the other covers candidates added from the remote end via addIceCandidate:
gatheredHostCandidate- a local host candidate was gathered.gatheredMdnsCandidate- a local host candidate with an mDNS.localaddress was gathered.gatheredSrflxCandidate- a local server-reflexive (STUN) candidate was gathered.gatheredTurnCandidate- a local relay (TURN) candidate was gathered.addedHostCandidate- a remote host candidate was added.addedMdnsCandidate- a remote host candidate ending in.localwas added.addedSrflxCandidate- a remote server-reflexive candidate was added.addedTurnCandidate- a remote relay candidate was added.addedNullCandidate- the end-of-candidates signal,addIceCandidate(null), was received.
Extracted by the open-source rtcstats-features package into your own database.
Why it matters
These booleans are the fastest way to see why a connection did or did not have a path to try. If gatheredSrflxCandidate is false, your STUN server was unreachable and no reflexive candidate was learned, so peers behind NAT have little to work with. If gatheredTurnCandidate is false on calls that should relay, TURN was misconfigured or unreachable and hard-NAT cases will fail outright. Comparing the gathered set against the added set tells you whether the problem is on your side (nothing gathered) or the remote side (nothing added). A missing addedNullCandidate can indicate the remote never finished gathering.
Common values
- All flags are booleans; a false host flag is unusual and points at a gathering failure.
- Relay flags being false on hard-NAT calls is the classic explanation for a connectivity failure.
SQL example
Share of connections that gathered each candidate type:
SELECT
AVG(CASE WHEN connection.gathered_host_candidate THEN 1 ELSE 0 END) AS host_rate,
AVG(CASE WHEN connection.gathered_srflx_candidate THEN 1 ELSE 0 END) AS srflx_rate,
AVG(CASE WHEN connection.gathered_turn_candidate THEN 1 ELSE 0 END) AS turn_rate,
COUNT(*) AS connections
FROM features_connection AS connection;
Related features
- Selected candidate pair - which of these candidates actually won the connection.
- ICE servers - the STUN and TURN configuration that determines what can be gathered.
See also
- rtcstats-server feature extraction - the full feature reference. These features are extracted by rtcstats-server and live in the open-source
rtcstats-featurespackage.