Handle fragmented replay events in recording and playback

This commit is contained in:
Mike Cao committed 2026-06-15 13:46:24 -07:00
1 parent 4987e0ca01
commit 15038b09d9
6 files changed
+345 -34

No files matched your search

+2 -1
View File
@@ -7,6 +7,7 @@ import { getClientInfo, hasBlockedIp } from '@/lib/detect';
import { parseToken } from '@/lib/jwt';
import { fetchAccount, fetchTeam } from '@/lib/load';
import { getRecorderConfig } from '@/lib/recorder';
import { getReplayEventCount } from '@/lib/replay';
import { parseRequest } from '@/lib/request';
import { badRequest, forbidden, json, payloadTooLarge, serverError } from '@/lib/response';
import { getWebsite } from '@/queries/prisma';
@@ -197,7 +198,7 @@ export async function POST(request: Request) {
visitId,
chunkIndex,
events,
eventCount: events.length,
eventCount: getReplayEventCount(events),
startedAt,
endedAt,
});