v150 · origin trial · webrtc · diagnostics
WebRTC Diagnostic Logging API
The WebRTC Diagnostic Logging API lets an authorized application ask the browser to record internal WebRTC diagnostic logs for local debugging of hard-to-reproduce connectivity and media-quality issues. The app never sees the log contents — it only receives a session ID. With allowUpload and explicit user authorization, the collected log can also be shared with the browser vendor to help fix user-agent bugs.
In Chrome 150 this API is available through an origin trial on desktop (trial window: Chrome 150–155; ship estimate 156, status “Proposed”, per the chromestatus API as updated 2026-06-25). To use it:
- Register your origin for the WebRTC Diagnostic Logging API trial at developer.chrome.com/origintrials and serve the resulting token (
<meta http-equiv="origin-trial">tag orOrigin-Trialheader). - Serve the page over HTTPS — the interface is exposed with
[SecureContext]. - Collection and upload both require explicit user authorization; the authorization UI is implementation-defined (UI controls, prompts, and/or enterprise policies).
Implementation/debug note: the runtime-enabled feature is RTCDiagnosticLogging (status: experimental, with origin_trial_feature_name: RTCDiagnosticLogging, in runtime_enabled_features.json5), so --enable-blink-features=RTCDiagnosticLogging also gates the binding — but the origin-trial token is the documented production path.
at a glance
| Milestone listing | Chrome 150 — Origin trial (trial window 150–155, desktop) |
|---|---|
| Ship estimate | Feature detail (chromestatus API, updated 2026-06-25): desktop 156, status text “Proposed”, active stage “Prepare to ship” |
| Interface | RTC, reached via navigator.rtc |
| Context | Secure contexts only; collection + upload require explicit user authorization |
| Runtime flag | RTCDiagnosticLogging in runtime_enabled_features.json5 (status experimental, origin-trial feature) |
| Standards body | WICG — WebRTC Diagnostic Logging |
| ChromeStatus | 5091582546149376 — WebRTC Diagnostic Logging API |
Syntax
The API hangs off Navigator as a single read-only rtc attribute returning an RTC instance with three asynchronous session methods. IDL from the WICG draft:
[Exposed=Window]
partial interface Navigator {
[SameObject] readonly attribute RTC rtc;
};
[Exposed=Window, SecureContext]
interface RTC {
Promise<DOMString> startDiagnosticLogging(optional RTCDiagnosticLoggingOptions options = {});
Promise<undefined> finishDiagnosticLogging();
Promise<undefined> cancelDiagnosticLogging();
};
dictionary RTCDiagnosticLoggingOptions {
boolean allowUpload = false;
record<DOMString, DOMString> metadata;
};
Source: WICG WebRTC Diagnostic Logging — IDL index
startDiagnosticLogging(options)
Begins a logging session. The user agent starts recording internal WebRTC logs for the calling browsing context and its descendants. Resolves with a unique session ID (a UUID) — the only piece of diagnostic information the application ever receives.
| Part | Detail |
|---|---|
| Parameters | options (optional) — allowUpload (boolean, default false): allow sharing the collected log with the user agent, subject to explicit user authorization; metadata (record of string key–value pairs): custom metadata attached to the log |
| Metadata limits | At most 5 key–value pairs; each key and each value at most 100 characters |
| Returns | Promise<DOMString> — resolves with the unique session ID (UUID) |
| Exceptions | TypeError — metadata exceeds 5 entries, or any key or value exceeds 100 characters |
finishDiagnosticLogging()
Ends the session and finalizes the log file. The promise resolves when the session is successfully closed, and the user agent must not log WebRTC activity for the session afterwards. If the session was started with allowUpload: true, the user agent may upload the finalized log to a user-agent-defined endpoint — again, only with user authorization.
cancelDiagnosticLogging()
Stops the session and discards everything collected. The promise resolves when the session is terminated; the user agent must not log afterwards, and because the data is discarded it cannot be uploaded. (The explainer's example code calls this cancelLogging(), but the specification's IDL — the authoritative surface — names it cancelDiagnosticLogging().)
What the app can and cannot see
The design deliberately keeps diagnostic content away from the application. The explainer states as an explicit non-goal that the API exposes nothing to the app beyond the session ID — the logs may contain internal information about user activity. The finished log is stored as a local file that the user can access, and the optional upload path shares it with the user agent (the browser vendor) — never with the site. The format of the log and the upload mechanism are intentionally unspecified; the only hard requirement is explicit user authorization. A site can attach small pieces of metadata (for example an app identifier) so a shared log can be matched to a bug report filed with the browser vendor.
Source: WICG explainer — goals, non-goals, privacy & securityExamples
// Before starting a call — begin a session (optionally allow upload + metadata)
const sessionId = await navigator.rtc.startDiagnosticLogging({
allowUpload: true,
metadata: { app: "my-call-app" }, // <= 5 pairs, <= 100 chars each
});
// The app stores the session ID — it is the ONLY data it ever gets back.
// When the call ends normally — finalize the log locally
await navigator.rtc.finishDiagnosticLogging();
// When the captured session is not useful — discard it entirely
await navigator.rtc.cancelDiagnosticLogging();
Source: WICG explainer — proposed approach
Browser compatibility
There is no browser-compat-data (BCD) entry for this API yet, so the table below is an interim view built from ChromeStatus ship data and public signals — not from BCD.
| Browser | Status | Notes |
|---|---|---|
| Chrome | 150–155 (origin trial) | Desktop origin trial; feature detail (API, 2026-06-25) estimates desktop shipping 156, status “Proposed” |
| Edge | Not separately reported | No Edge position is recorded on ChromeStatus; no public support evidence (Chromium engine equivalence is not a support commitment) |
| Firefox | No signal | Recorded on ChromeStatus |
| Safari | No signal | Recorded on ChromeStatus |
Beyond vendor signals, the explainer records stakeholder positions: Google (implementer) positive, and ByteDance positive (as a WebRTC application stakeholder, not a browser vendor).
Source: chromestatus.com/feature/5091582546149376; WICG explainer — stakeholder feedback; mdn/browser-compat-data (no entry as of July 2026)Specifications
| Specification | Status |
|---|---|
| WebRTC Diagnostic Logging API | WICG draft (incubation) |
| W3C WebRTC Extensions — proposal issue #124 | Public discussion |