v145 · Web APIs · Crash Reporting
Crash Reporting key-value API
Chrome 145 adds a key-value annotation API to the browser's crash reporter, letting web applications attach structured metadata that appears alongside crash reports — user ID, session ID, feature flags, and more.
background
When Chrome crashes, the browser sends a crash report to a server. Previously, the only context came from the Chrome crash infrastructure itself. The Crash Reporting key-value API allows the web application running in that tab to attach its own key-value pairs to the crash report — giving developers the data they need to reproduce and diagnose the crash.
The API is write-only and ephemeral: values are stored in the renderer process and discarded when the page unloads. They are included in the report only if a crash occurs while the tab is open.
concepts
-
Crash Report Demo
Demonstrates setting crash keys and shows how the API works, including feature detection and the write-only, ephemeral contract of crash annotations.
-
Triage Console
Scenario-driven crumb editor: apply checkout-flow, video-player, or document presets, watch the byte budget update, and rehearse what a crash report would carry. Falls back to an in-memory shim when the flag is off.
-
API Reference
Full method reference, key name constraints, value encoding, and best practices for choosing which data to include in crash annotations.
-
Session Journal
Walk a multi-step checkout and watch real crash keys update at each step when
navigator.crashReporteris available. The live preview mirrors the write-only keys sent to the API.
the change
// Chrome 145+: attach key-value pairs to crash reports
if ('crashReporter' in navigator) {
navigator.crashReporter.setKey('user_id', 'usr_abc123');
navigator.crashReporter.setKey('session_id', sessionStorage.getItem('sid'));
navigator.crashReporter.setKey('feature_flags', 'dark_mode,new_checkout');
navigator.crashReporter.setKey('app_version', '3.14.0');
}
// Keys are included if the renderer crashes.
// They are NOT sent to any server proactively — only on crash.
// Values must be strings; max length is implementation-defined.
// Keys are overwritten if set again with the same name.
// To remove a key:
navigator.crashReporter.setKey('user_id', ''); // empty string clears it