← Chrome 150 reference

v150 · origin trial · webrtc · diagnostics

WebRTC Diagnostic Logging API

Limited availability

  • Chrome · origin trial 151–156
  • Edge · not separately reported
  • Firefox · no signal
  • Safari · no signal

Not on the Baseline register (no web-features entry at webstatus.dev). Chrome-only origin trial on desktop (window: Chrome 151–156); the feature detail (chromestatus API, accurate as of 2026-08-24) estimates desktop shipping at 156 with status text “Proposed”.

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 explicit user authorization, the collected log can also be shared with the browser vendor to help fix user-agent bugs; that share path is user-authorised and implementation-defined, and the API itself no longer carries an upload switch.

Origin trial — API surface may move

In Chrome 150 this API is available through an origin trial on desktop (trial window: Chrome 151–156; ship estimate 156, status “Proposed”, per the chromestatus API as accurate on 2026-08-24). To use it:

Implementation/debug note: the surface on this page is enabled by the runtime feature RTCDiagnosticLogging, which now has status: {"Android": "", "default": "stable"} in runtime_enabled_features.json5 — stable on desktop, disabled on Android — and it carries origin_trial_feature_name: RTCDiagnosticLogging. The pre-rewrite surface (navigator.rtc with promises) is what the separate RTCLegacyDiagnosticLogging feature gates, and that one is still status: experimental. So --enable-blink-features=RTCDiagnosticLogging now forces the new surface, and RTCLegacyDiagnosticLogging is the flag for the old one.

Source: chromestatus.com/feature/5091582546149376; Chromium runtime_enabled_features.json5

at a glance

At a glance
Milestone listingChrome 150 — Origin trial (trial window 151–156, desktop)
Ship estimateFeature detail (chromestatus API, accurate as of 2026-08-24): desktop 156, status text “Proposed”, active stage “Prepare to ship”
Interfacestatic methods on RTCPeerConnection (startDiagnosticLogging, stopDiagnosticLogging, cancelDiagnosticLogging)
ContextCollection + upload require explicit user authorization; an origin trial requires a secure origin
Runtime flagRTCDiagnosticLogging in runtime_enabled_features.json5 (status {Android: "", default: "stable"}, origin-trial feature); the pre-rewrite surface is gated by RTCLegacyDiagnosticLogging (status experimental)
Standards bodyW3C WebRTC Extensions — Diagnostic Logging (Working draft; incubated in WICG)
ChromeStatus5091582546149376 — WebRTC Diagnostic Logging API
Source: chromestatus.com/feature/5091582546149376

Syntax

The API is exposed as a set of static methods on the RTCPeerConnection interface — synchronous calls, not the promise-returning navigator.rtc surface of the earlier draft. IDL from the WebRTC Extensions specification:

[Exposed=Window]
partial interface RTCPeerConnection {
  static DOMString startDiagnosticLogging(optional RTCDiagnosticLoggingOptions options = {});
  static undefined stopDiagnosticLogging();
  static undefined cancelDiagnosticLogging();
};

dictionary RTCDiagnosticLoggingOptions {
  record<DOMString, DOMString> metadata;
};
Source: W3C WebRTC Extensions — Diagnostic Logging (IDL); WICG WebRTC Diagnostic Logging (the incubation document, serving the same surface)

startDiagnosticLogging(options)

Begins a logging session. The user agent starts recording internal WebRTC logs, and the call returns a unique session ID (a UUID) — the only piece of diagnostic information the application ever receives. There is no promise: the returned string is the session ID. The session lives in an [[RTCDiagnosticLoggingSessionId]] internal slot on the relevant global object, which the specification initializes to null. (The W3C WebRTC Extensions specification is internally inconsistent about where this slot lives: its Internal slots section defines it on the relevant global object, while its algorithm steps reference RTCPeerConnection/[[RTCDiagnosticLoggingSessionId]]; this page follows the Internal slots definition.)

startDiagnosticLogging() — parameters, return value, exceptions
PartDetail
Parametersoptions (optional) — metadata (record of string key–value pairs): custom metadata attached to the log. This is the dictionary's only member; the earlier draft's allowUpload switch has been removed from the API.
Metadata limitsAt most 5 key–value pairs; each key and each value at most 100 characters
ReturnsDOMString — the unique session ID (the specification says it is a randomly generated UUID, and SHOULD be in RFC 4122 §4.4 form)
ExceptionsInvalidStateError — the relevant global object already has a non-null [[RTCDiagnosticLoggingSessionId]] internal slot, i.e. a session is already running. TypeError — the metadata exceeds 5 entries, or any key or value exceeds 100 characters. (The WICG incubation document's step for the metadata case still reads “return a promise rejected with a TypeError” even though this operation is now synchronous; the W3C specification already reads “throw a TypeError”.)

stopDiagnosticLogging()

Ends the session and finalizes the log file. The user agent must not log WebRTC activity for the session afterwards. The call returns undefined; whether the finalized log is ever shared with the browser vendor is a matter of user authorization and user-agent behaviour, not of an API switch.

stopDiagnosticLogging() — return value and exceptions
PartDetail
Returnsundefined
ExceptionsInvalidStateError — the [[RTCDiagnosticLoggingSessionId]] internal slot is null, i.e. no session is running

cancelDiagnosticLogging()

Stops the session and discards everything collected; the user agent must not log afterwards, and because the data is discarded it cannot be shared. The call returns undefined. Two naming mismatches are worth knowing about, and neither changes what you call: the WICG incubation document's section heading for this operation reads discardDiagnosticLogging() while its IDL — the authoritative surface, and what implementers type — declares cancelDiagnosticLogging() (the W3C specification has no discardDiagnosticLogging anywhere); and the explainer's example code uses cancelLogging(). The explainer also still names the second operation finishDiagnosticLogging() where the IDL says stopDiagnosticLogging().

cancelDiagnosticLogging() — return value and exceptions
PartDetail
Returnsundefined
ExceptionsInvalidStateError — the [[RTCDiagnosticLoggingSessionId]] internal slot is null, i.e. no session is running
Source: W3C WebRTC Extensions — Diagnostic Logging (methods); WICG explainer

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 any share path gives it to the user agent (the browser vendor) — never to the site. The format of the log and the mechanism by which it may be shared 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 & security

Examples

Live example from the Chrome Platform Showcase: the start → finish / cancel session lifecycle. Source: chrome-platform-showcase — live demo
// Before starting a call — begin a session (metadata only: <= 5 pairs, <= 100 chars each)
const sessionId = RTCPeerConnection.startDiagnosticLogging({
  metadata: { app: "my-call-app" },
});   // synchronous: DOMString, not a promise
// The app stores the session ID — it is the ONLY data it ever gets back.

// When the call ends normally — finalize the log locally
RTCPeerConnection.stopDiagnosticLogging();

// When the captured session is not useful — discard it entirely
RTCPeerConnection.cancelDiagnosticLogging();
Source: WICG explainer — proposed approach; W3C WebRTC Extensions — Diagnostic Logging

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.

Interim compatibility — from ChromeStatus, not BCD
BrowserStatusNotes
Chrome151–156 (origin trial)Desktop origin trial; feature detail (API, accurate as of 2026-08-24) estimates desktop shipping 156, status “Proposed”
EdgeNot separately reportedNo Edge position is recorded on ChromeStatus; no public support evidence (Chromium engine equivalence is not a support commitment)
FirefoxNo signalRecorded on ChromeStatus
SafariNo signalRecorded 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 October 2026)

Specifications

Specifications
SpecificationStatus
WebRTC Extensions — Diagnostic LoggingWorking draft (W3C WebRTC Working Group) — the canonical home recorded on ChromeStatus
WebRTC Diagnostic Logging APIWICG draft (incubation) — serves the same surface as the WebRTC Extensions section
W3C WebRTC Extensions — proposal issue #124Public discussion
Source: spec links recorded on chromestatus.com/feature/5091582546149376

See also