mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-25 00:51:28 +02:00
recordConnectionMetrics mapped only conntype.Relay to "relay" and let a default branch record everything else as "ice". ICETurn (ICE through a TURN server, which conn.isRelayed treats as relayed) and None (no connection established yet, set on relay drop and on peer-state reset) were therefore reported as direct peer-to-peer, overstating the direct-connection share on every platform. The mapping now lists every priority explicitly and emits ice_p2p, ice_turn, relay or unknown. Values do not reuse "ice": samples recorded with the old tag conflate the three states, so keeping the name would make historical and corrected samples indistinguishable. Most visible on mobile, where iOS and Android force relay by default and no ICE worker is created: their "ice" samples could only ever have been mislabelled None states.