v160 · webtransport · getStats() · inspection

Member inventory: what the spec defines vs what you get

The spec's WebTransportConnectionStats has fourteen members and its datagrams dictionary four more — but "any unavailable stats will be absent", and a user agent exposes only the members it chooses. Chromium's own IDL declares just five connection members (no byte or packet totals, no atSendCapacity). On top of that, a pooled session may only report the members the spec marks as pooled connection stats. This tool runs a real getStats() and checks every member, one by one, with the in operator.

Availability. Chrome 160 ships WebTransport.prototype.getStats() enabled by default — the Blink runtime feature WebTransportStats is status: "stable" in runtime_enabled_features.json5. On an older Chrome the method is absent: enable chrome://flags/#enable-experimental-web-platform-features and relaunch, or launch with --enable-blink-features=WebTransportStats (both verified on Chrome 153). Real numbers also need a WebTransport server you can reach: this showcase has no HTTP/3 server of its own, so the default endpoint is a public echo server. If your network blocks QUIC the attempt fails with the real error, shown verbatim — never a made-up result. Running your own server is a few lines; see the local echo server recipe.

Inventory a live result

WebTransport endpoint

Any WebTransport server you can reach — a public echo server by default, or your own local one.

For a local self-signed server (ECDSA, ≤14-day cert). Leave empty for a publicly trusted certificate.

Pooling is a request, not a promise: Chrome may still give you a fresh connection. When the connection is shared, the spec removes every stat not marked "pooled" so one session cannot learn another's traffic volume.

Not run yet. The table below lists the spec contract; the last column fills in from a real result.
WebTransportConnectionStats + WebTransportDatagramStats
memberIDL type · unitpooled stat?in Chromium IDL?this browser's result

why members go missing

code path

const stats = await transport.getStats();
const want = ["bytesSent", "packetsLost", "smoothedRtt", "atSendCapacity"];
for (const name of want) {
  console.log(name, name in stats ? stats[name] : "(not exposed)");
}
// datagrams is `required` — it is always there, but its members may not be:
"expiredIncoming" in stats.datagrams;

see also