Bug 1402221: add Telemetry probe to find out rtcp-mux usage. r?bwc
MozReview-Commit-ID: 1XmPbpSmAb1
--- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
+++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
@@ -12,16 +12,17 @@
#include "nspr.h"
#include "nss.h"
#include "pk11pub.h"
#include "nsDebug.h"
#include "logging.h"
#include "mozilla/Move.h"
#include "mozilla/UniquePtr.h"
+#include "mozilla/Telemetry.h"
#include "webrtc/config.h"
#include "signaling/src/jsep/JsepTrack.h"
#include "signaling/src/jsep/JsepTrack.h"
#include "signaling/src/jsep/JsepTransport.h"
#include "signaling/src/sdp/Sdp.h"
#include "signaling/src/sdp/SipccSdp.h"
@@ -1529,16 +1530,21 @@ JsepSessionImpl::MakeNegotiatedTrackPair
if (transport->mComponents == 2) {
// RTCP MUX or not.
// TODO(bug 1095743): verify that the PTs are consistent with mux.
MOZ_MTLOG(ML_DEBUG, "RTCP-MUX is off");
trackPairOut->mRtcpTransport = transport;
}
+ if (local.GetMediaType() != SdpMediaSection::kApplication) {
+ Telemetry::Accumulate(Telemetry::WEBRTC_RTCP_MUX,
+ transport->mComponents == 1);
+ }
+
return NS_OK;
}
void
JsepSessionImpl::InitTransport(const SdpMediaSection& msection,
JsepTransport* transport)
{
if (mSdpHelper.MsectionIsDisabled(msection)) {
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -9215,16 +9215,24 @@
},
"WEBRTC_DATACHANNEL_NEGOTIATED": {
"record_in_processes": ["main", "content"],
"alert_emails": ["webrtc-telemetry-alerts@mozilla.com"],
"expires_in_version": "never",
"kind": "boolean",
"description": "Was DataChannels negotiated"
},
+ "WEBRTC_RTCP_MUX": {
+ "record_in_processes": ["main", "content"],
+ "bug_numbers": [1402221],
+ "alert_emails": ["webrtc-telemetry-alerts@mozilla.com", "nohlmeier@mozilla.com"],
+ "expires_in_version": "62",
+ "kind": "boolean",
+ "description": "Was RTCP-MUX negotiated for a track"
+ },
"WEBRTC_CALL_TYPE": {
"record_in_processes": ["main", "content"],
"alert_emails": ["webrtc-telemetry-alerts@mozilla.com"],
"expires_in_version": "never",
"kind": "enumerated",
"n_values": 8,
"description": "Type of call: (Bitmask) Audio = 1, Video = 2, DataChannels = 4"
},