Sampling

Sampling in session replay means recording a subset rather than everything, and the word covers two distinct levels: session sampling, capturing only a percentage of sessions, and event sampling, throttling high-frequency event types like mouse moves within a recorded session. Both trade completeness for cost, at different granularities.

How it works

Session sampling is a policy decision at recording start: record 10 percent of sessions uniformly, or 100 percent of sessions matching criteria (errors, specific pages, high-value accounts) and a sample of the rest. Event sampling is rrweb's sampling option; the storage optimization recipe shows its configuration: throttle mousemove capture, batch scroll events, reduce input granularity to "the field changed" rather than per keystroke, and cap canvas frame rates. The costs differ in kind: session sampling risks missing the one session that mattered (the rare failure a support ticket references), while event sampling coarsens every session slightly. Data minimization principles also cast sampling as a privacy control: capture no more granularity than the purpose needs.

Where you encounter it

Storage budgeting, recorder configuration, and compliance write-ups, where minimization arguments lean on it.