Update session replay payload to use { type, payload } format

This commit is contained in:
Mike Cao committed 2026-03-23 16:30:53 -07:00
1 parent aea373ca56
commit 7582aed67b
3 files changed
+14 -7

No files matched your search

+6 -3
View File
@@ -39,9 +39,12 @@ import { record } from 'rrweb';
if (!session?.cache) return;
const body = JSON.stringify({
website,
events,
timestamp: Math.floor(Date.now() / 1000),
type: 'record',
payload: {
website,
events,
timestamp: Math.floor(Date.now() / 1000),
},
});
// keepalive has a 64KB body limit — only use it for small payloads on unload