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
connectiongeolocationgeoipregionpeer

Peer geolocation (feature)

Where the far end of the call was, derived from the remote candidate of the selected pair for cross-region call mapping.

Description

Connection-level features, extracted per RTCPeerConnection into features_connection.

When your rtcstats-server is configured for geolocation, these fields annotate the remote endpoint of the selected candidate pair with geographic data:

  • rtcstatsPeerLocationContinent - continent of the far-end peer.
  • rtcstatsPeerLocationCountry - country of the far-end peer.
  • rtcstatsPeerLocationCity - city of the far-end peer.

These are null when GeoIP is not configured or the peer address cannot be resolved. Location is derived on your own server from the remote candidate address, so no client-side geolocation permission is involved.

Why it matters

Peer location tells you where the other side of each call actually sat, which is what lets you map cross-region traffic. Pairing peer location against local location shows how often calls cross continents, and a heavy cross-region pattern is a signal to add relays or edge capacity closer to one side. It also turns quality features into a route-aware view: freeze rate or round-trip time for calls whose peer was on another continent is a very different number from same-region calls, and separating the two keeps a distant-peer problem from being blamed on your infrastructure.

SQL example

Call volume by peer country:

SELECT
  connection.rtcstats_peer_location_country AS peer_country,
  COUNT(*) AS connections
FROM features_connection AS connection
WHERE connection.rtcstats_peer_location_country IS NOT NULL
GROUP BY connection.rtcstats_peer_location_country
ORDER BY connections DESC;

See also