v150 · WebRTC
Bug-report companion
When a user reports a broken call, you want the browser's diagnostics and your app's context lined up. Start a session with structured metadata and stamp the returned session ID onto your bug report. The current spec caps metadata at 5 entries with keys/values ≤ 100 characters — exceed it and startDiagnosticLogging() throws a TypeError synchronously, before any session starts. The rewrite dropped the old allowUpload option and the finishDiagnosticLogging() name: authorisation is implementation-defined, and the session is closed with stopDiagnosticLogging().
RTCPeerConnection.startDiagnosticLogging() is not available in this browser.Launch Chrome 150+ with
--enable-blink-features=RTCDiagnosticLogging, or enable
chrome://flags/#enable-experimental-web-platform-features and reload over HTTPS/localhost.
The start button calls the real API and shows exactly what it returns.
Bug report — auto-stamped with the session ID
rtc-log: (none yet)
Start a session to generate a bug-report stub.
const sessionId = RTCPeerConnection.startDiagnosticLogging({
metadata: { // ≤ 5 entries, keys/values ≤ 100 chars
app: "acme-meet", // otherwise a TypeError is thrown synchronously
version: "4.7.1",
callId: "c-88213",
},
});
fileBugReport({ rtcDiagnosticId: sessionId }); // attach ID, like a crash ID
RTCPeerConnection.stopDiagnosticLogging(); // finalise the local log
see also
- Logging lifecycle — start / stop / cancel
- Capability & policy probe — the enterprise-policy gate
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗