← Chrome 160 reference · All APIs
v160 · webtransport · enabled by default
WebTransport connection statistics
Ships WebTransport.getStats(), returning an asynchronous WebTransportConnectionStats snapshot for an active or closed WebTransport session: QUIC round-trip time metrics (smoothedRtt, rttVariation, minRtt), congestion-estimated sending rate (estimatedSendRate), and datagrams counters (droppedIncoming, expiredIncoming, expiredOutgoing, lostOutgoing). Chromium 160 does not yet expose connection-level byte/packet totals or atSendCapacity.
at a glance
| Shipped in | Chrome 160 (desktop, Android, Android WebView), enabled by default — filed under “Enabled by default” in the milestone=160 listing and ChromeStatus API record |
|---|---|
| Runtime flag | Enabled by default (status: "stable" for WebTransportStats in runtime_enabled_features.json5); previously behind chrome://flags/#enable-experimental-web-platform-features |
| Specification | W3C WebTransport — getStats(), WebTransportConnectionStats, WebTransportDatagramStats |
| Explainer | W3C WebTransport Explainer — Stats |
| Intent | blink-dev Intent to Ship |
| Tracking bug | issues.chromium.org/573538454 |
| Web platform tests | webtransport/stats.https.any.html (WPT source) |
| TAG review | w3ctag/design-reviews#1212 |
| ChromeStatus | 5120203192139776 — WebTransport connection statistics |
why it exists
Real-time WebTransport applications (live video, cloud gaming, collaborative editors, telemetry) need to separate network latency, congestion, and datagram drops from application-side queuing delays. Without connection-level stats, an application cannot tell whether incoming datagrams are overflowing the client receive buffer, whether outgoing datagrams are expiring before transmission or being lost on the wire, or how much bandwidth the QUIC congestion controller estimates is available. WebTransport.getStats() exposes a single asynchronous snapshot of underlying connection health without altering transmission behavior, complementing the per-stream and per-group byte counters added in Chrome 159 send groups.
Syntax
Chromium 160 Blink WebIDL (web_transport.idl, web_transport_connection_stats.idl, web_transport_datagram_stats.idl):
[Exposed=(Window,Worker), SecureContext]
partial interface WebTransport {
Promise<WebTransportConnectionStats> getStats();
};
dictionary WebTransportConnectionStats {
DOMHighResTimeStamp smoothedRtt;
DOMHighResTimeStamp rttVariation;
DOMHighResTimeStamp minRtt;
required WebTransportDatagramStats datagrams;
unsigned long long? estimatedSendRate = null;
};
dictionary WebTransportDatagramStats {
unsigned long long droppedIncoming;
unsigned long long expiredIncoming;
unsigned long long expiredOutgoing;
unsigned long long lostOutgoing;
};
This reference covers all three parts of the Chrome 160 surface: WebTransport.getStats(), WebTransportConnectionStats (including the 9 W3C spec members omitted in Chrome 160), and WebTransportDatagramStats.
WebTransport.getStats()
Inputs. Takes no arguments (WebTransport.prototype.getStats.length === 0). Invoked on a WebTransport instance.
Outputs. Returns a fresh Promise<WebTransportConnectionStats> on every invocation (two concurrent calls return distinct Promise objects: wt.getStats() !== wt.getStats()). In Chromium’s web_transport.cc, concurrent calls while an IPC stats request is already in flight are coalesced into one network-service round trip and resolved with the resulting snapshot.
WebTransportConnectionStats dictionary
Populated members in Chrome 160. All RTT and send-rate members are pooled connection stats under W3C WebTransport §6.13:
| Member | Type / unit | Pooled? | Chrome 160 behavior |
|---|---|---|---|
smoothedRtt | DOMHighResTimeStamp (ms) | Yes | Smoothed QUIC RTT (RFC 9002 §5.3); omitted until QUIC has a positive min_rtt sample |
rttVariation | DOMHighResTimeStamp (ms) | Yes | Mean RTT variation (RFC 9002 §5.3); omitted until QUIC has a positive min_rtt sample |
minRtt | DOMHighResTimeStamp (ms) | Yes | Minimum RTT observed on the connection (RFC 9002 §5.2); omitted until positive |
estimatedSendRate | unsigned long long? (bits/s) | Yes | Congestion-controller payload send rate estimate excluding framing; defaults to null when unavailable (<= 0) and may revert to null on later calls. Blink notes estimates are most accurate when BBRv1/BBRv2 is active (see congestionControl) |
datagrams | WebTransportDatagramStats (required) | No (counters) | Always present as a non-null object; see WebTransportDatagramStats |
W3C spec members omitted in Chrome 160. The W3C WebTransport specification also defines eight connection byte/packet totals (bytesSent, bytesSentOverhead, bytesAcknowledged [at risk], packetsSent, bytesLost, packetsLost, bytesReceived, packetsReceived) and atSendCapacity (default false). Chromium 160 does not expose these nine members; they are absent (undefined) on returned dictionaries. Check "bytesSent" in stats before reading them.
WebTransportDatagramStats dictionary
Inputs & outputs. Returned as the required stats.datagrams property of WebTransportConnectionStats. Every counter is a non-negative unsigned long long integer:
| Member | Meaning | Source in Chromium 160 |
|---|---|---|
droppedIncoming | Incoming datagrams dropped because the application did not read from datagrams.readable before the receive buffer (incomingMaxBufferedDatagrams) overflowed | Computed in Blink (datagram_queue_ after applying queue limits) |
expiredIncoming | Incoming datagrams dropped because they exceeded datagrams.incomingMaxAge before being read | Computed in Blink (datagram_queue_) |
expiredOutgoing | Outgoing datagrams dropped in the send queue because they exceeded datagrams.outgoingMaxAge before transmission | Network service (QUIC) |
lostOutgoing | Sent datagrams declared lost per RFC 9002 §6.1 | Network service (QUIC) |
Lifecycle and state transitions
- Before connection establishment (
[[State]] === "connecting"): callingwt.getStats()beforeawait wt.readydoes not throw; the returned promise waits until the connection transitions out of"connecting", then resolves with stats if it connects or rejects withInvalidStateErrorif the handshake fails. - While connected (
[[State]] === "connected"): queries the network service asynchronously and updates Chromium’s cachedlatest_stats_snapshot. Per W3C §6.13, whether a UA chooses to expose a member is fixed once per session (exceptestimatedSendRate, which can transition to or fromnull, and RTT fields before the first sample). - During and after normal closure (
[[State]] === "closed"): calls issued immediately beforewt.close()or afterwt.close()resolve with the most recent cached stats snapshot (including updated incoming datagram drop/expiry counters flushed during cleanup). - Failed connection (
[[State]] === "failed"): rejects withDOMException("InvalidStateError")on both initial and repeatedgetStats()calls.
Errors and defensive handling
InvalidStateError(DOMException, code11):wt.getStats()returns a rejected promise if theWebTransportconnection is in the"failed"state (for example DNS/TLS/HTTP3 handshake failure or abrupt transport failure with no prior snapshot).- Missing optional members:
smoothedRtt,rttVariation, andminRttare absent until QUIC records a positive RTT sample;estimatedSendRateisnullwhen no bandwidth estimate exists; non-pooled byte/packet counters andWebTransportDatagramStatsfields may be omitted on pooled connections or in other engines. Always guard with"smoothedRtt" in stats,stats.estimatedSendRate !== null, andstats.datagrams?.lostOutgoing ?? 0. - Pre-160 Chrome / older Firefox: feature-detect
typeof wt.getStats === "function"and catch rejections (Firefox 114–157 exposedgetStatsas a stub that rejected with a not-implemented error before Firefox 158 implemented it).
Context and exposure
WebTransport.getStats(), WebTransportConnectionStats, and WebTransportDatagramStats are exposed in Window and Worker contexts (dedicated, shared, and service workers) and require a SecureContext (HTTPS or localhost). No user permission or user activation is required.
Examples
WebTransport.getStats(). Source: Chrome Platform Showcase (stats-snapshot); more demos at v160/webtransport-connection-statistics and Microsoft Edge webtransport-getstats demo.Polling RTT and estimated send rate safely across engines
async function inspectConnectionHealth(wt) {
if (typeof wt.getStats !== "function") {
return { supported: false };
}
try {
const stats = await wt.getStats();
return {
supported: true,
smoothedRttMs: "smoothedRtt" in stats ? stats.smoothedRtt : null,
rttVariationMs: "rttVariation" in stats ? stats.rttVariation : null,
minRttMs: "minRtt" in stats ? stats.minRtt : null,
estimatedSendRateBps: stats.estimatedSendRate ?? null,
// Optional in W3C spec; absent in Chrome 160
bytesSent: "bytesSent" in stats ? stats.bytesSent : null,
};
} catch (err) {
if (err.name === "InvalidStateError") {
// Connection failed before establishing
return { supported: true, failed: true };
}
throw err;
}
}
Source: W3C WebTransport §6.13; WPT stats.https.any.js.
Monitoring WebTransportDatagramStats and post-close telemetry
const wt = new WebTransport("https://example.com:4433/wt", {
congestionControl: "low-latency",
});
await wt.ready;
// Read final connection and datagram counters even after closing
wt.close({ closeCode: 0, reason: "session complete" });
const finalStats = await wt.getStats();
const {
droppedIncoming = 0,
expiredIncoming = 0,
expiredOutgoing = 0,
lostOutgoing = 0,
} = finalStats.datagrams;
console.log({
droppedIncoming,
expiredIncoming,
expiredOutgoing,
lostOutgoing,
});
Source: W3C WebTransport §6.14; WPT stats.https.any.js.
Browser compatibility
| Browser / runtime | Version | Notes & exposed fields |
|---|---|---|
| Chrome (desktop, Android, WebView) | 160 | Enabled by default (ChromeStatus 5120203192139776; BCD currently lists "preview"). Exposes smoothedRtt, rttVariation, minRtt, estimatedSendRate, and datagrams; omits connection byte/packet totals and atSendCapacity |
| Edge | 160 (mirror) | Chromium-based (BCD mirror); Microsoft Edge authored the webtransport-getstats demo |
| Firefox (desktop, Android) | 158 | Shipped in Firefox 158 (Oct 2026); BCD currently still records 114 as a partial not-implemented stub |
| Safari (macOS, iOS) | 26.4 / 27.2 (partial) | BCD records 26.4; ChromeStatus notes Safari 27.2 (WebKit-7625.2.8) returns default-initialized stats, with bytesSent/bytesReceived added on WebKit main |
| Deno | 2.2 (flag) | Behind --unstable-net per BCD |
Security and privacy
WebTransport.getStats() returns only aggregate transport statistics for a WebTransport session the caller already owns; it reveals neither payloads nor peer credentials and creates no new network capability. However, RTT metrics and estimatedSendRate can reveal characteristics of a user’s network path or correlate concurrent activity.
Connection pooling boundary. Under W3C WebTransport §6.13, when a session shares a pooled underlying HTTP/3 connection (allowPooling: true, [[NewConnection]] === "no"), non-pooled connection and datagram counters MUST be withheld so one session cannot observe another pooled session’s traffic volume; only pooled connection stats (smoothedRtt, rttVariation, minRtt, estimatedSendRate) may be disclosed across pooled sessions sharing the same network partition key. User agents may also withhold additional members for privacy as long as that choice remains consistent across calls within a session.
Specifications
see also
- Chrome Platform Showcase — WebTransport connection statistics demos (member inventory, adaptive bitrate monitor, datagram loss lab, lifecycle edges)
- gendn Chrome 159 — WebTransport send groups and send-stream prioritization (stream/group
getStats()) - gendn Chrome 159 — WebTransport congestionControl
- MDN —
WebTransport.getStats() - Microsoft Edge live demo — webtransport-getstats (source)
- Interop 2026 WebTransport proposal (web-platform-tests/interop#1121)
- ChromeStatus — WebTransport connection statistics (5120203192139776)