Lessons learned from building Session Replay, a DOM capturing product
summary
Built a DOM-capturing Session Replay that records diffs (not video) using a fork of rrweb, a mutation observer plus selective monkey patching for missing APIs, with default text masked as stars to avoid PII. Bundle size drops from about 53 KB to 35 KB by pruning unused rrweb code, swapping lighter dependencies and making features tree-shakeable. Payloads compress before upload using a compression library run inside a web worker to avoid blocking the main thread; captures and debugging tooling (console, network) successfully reproduce user state for fixing bugs.
AI-written summary · about
