Add reporting of relay protocol

This patch adds reporting of relay protocol,
i.e how a client connect to the turn server.

This is added in the old stats api...cause there
are clients still using it.

Bug: none
Change-Id: Iac7fe3e3de0ba42d5897c304ebbae368edf498fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239640
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35469}
This commit is contained in:
Jonas Oreland 2021-12-02 10:48:45 +01:00 committed by WebRTC LUCI CQ
parent adf7dc34f0
commit 0ee442256c
3 changed files with 5 additions and 0 deletions

View File

@ -654,6 +654,8 @@ const char* StatsReport::Value::display_name() const {
return "googWritable";
case kStatsValueNameAudioDeviceUnderrunCounter:
return "googAudioDeviceUnderrunCounter";
case kStatsValueNameLocalCandidateRelayProtocol:
return "googLocalCandidateRelayProtocol";
}
return nullptr;

View File

@ -239,6 +239,7 @@ class RTC_EXPORT StatsReport {
kStatsValueNameTypingNoiseState,
kStatsValueNameWritable,
kStatsValueNameAudioDeviceUnderrunCounter,
kStatsValueNameLocalCandidateRelayProtocol,
};
class RTC_EXPORT IdBase : public rtc::RefCountInterface {

View File

@ -808,6 +808,8 @@ StatsReport* StatsCollector::AddConnectionInfoReport(
info.remote_candidate.type());
report->AddString(StatsReport::kStatsValueNameTransportType,
info.local_candidate.protocol());
report->AddString(StatsReport::kStatsValueNameLocalCandidateRelayProtocol,
info.local_candidate.relay_protocol());
return report;
}