From 800fddb3b36e3c9582a3602fe0d8c872b226b54b Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Fri, 15 Mar 2024 08:18:27 +0000 Subject: [PATCH] fix: stringify less when processing recordindgs (#20943) * fix: stringify less when processing recordindgs * update snapshots --- .../sessionRecordingDataLogic.test.ts.snap | 49 +++++++++++++++++++ .../sessionRecordingPlayerLogic.test.ts.snap | 49 +++++++++++++++++++ .../player/sessionRecordingDataLogic.ts | 27 +++++++++- 3 files changed, 124 insertions(+), 1 deletion(-) diff --git a/frontend/src/scenes/session-recordings/player/__snapshots__/sessionRecordingDataLogic.test.ts.snap b/frontend/src/scenes/session-recordings/player/__snapshots__/sessionRecordingDataLogic.test.ts.snap index 5f38f5bd4636d..1941ebe103f3a 100644 --- a/frontend/src/scenes/session-recordings/player/__snapshots__/sessionRecordingDataLogic.test.ts.snap +++ b/frontend/src/scenes/session-recordings/player/__snapshots__/sessionRecordingDataLogic.test.ts.snap @@ -8,6 +8,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "href": "http://localhost:3000/", "width": 2560, }, + "seen": 501012029800196, "timestamp": 1682952380877, "type": 4, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -575,6 +576,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "type": 0, }, }, + "seen": 8726461620907292, "timestamp": 1682952380882, "type": 2, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -591,6 +593,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 8584030046878700, "timestamp": 1682952383040, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -603,6 +606,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 1618.84765625, "y": 299.01953125, }, + "seen": 2483146755249437, "timestamp": 1682952383262, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -615,6 +619,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 1618.84765625, "y": 299.01953125, }, + "seen": 5263782251753321, "timestamp": 1682952383263, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -628,6 +633,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 1618, "y": 299, }, + "seen": 5653094638019907, "timestamp": 1682952383264, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -650,6 +656,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 17060931257009, "timestamp": 1682952383543, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -690,6 +697,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 4557187183717243, "timestamp": 1682952384050, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -702,6 +710,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729.30859375, "y": 124.6875, }, + "seen": 8414661306677587, "timestamp": 1682952384230, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -712,6 +721,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "source": 2, "type": 5, }, + "seen": 5691729520402348, "timestamp": 1682952384231, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -724,6 +734,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729.30859375, "y": 124.5546875, }, + "seen": 5750299534503778, "timestamp": 1682952384310, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -737,6 +748,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729, "y": 124, }, + "seen": 8129303588045202, "timestamp": 1682952384313, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -749,6 +761,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729.30859375, "y": 124.0546875, }, + "seen": 5621966732519651, "timestamp": 1682952384447, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -761,6 +774,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729.30859375, "y": 124.0546875, }, + "seen": 7326349637770734, "timestamp": 1682952384460, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -774,6 +788,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729, "y": 124, }, + "seen": 7654897841603800, "timestamp": 1682952384463, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -786,6 +801,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729, "y": 124, }, + "seen": 6693982823133270, "timestamp": 1682952384464, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -820,6 +836,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 7596817111670310, "timestamp": 1682952384555, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -832,6 +849,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729.30859375, "y": 124.0546875, }, + "seen": 8853173800988607, "timestamp": 1682952384559, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -844,6 +862,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729.30859375, "y": 124.0546875, }, + "seen": 4271865787519747, "timestamp": 1682952384675, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -857,6 +876,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729, "y": 124, }, + "seen": 1674109008838975, "timestamp": 1682952384676, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -869,6 +889,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729.30859375, "y": 124.0546875, }, + "seen": 3659459423609925, "timestamp": 1682952384709, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -881,6 +902,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729.30859375, "y": 124.0546875, }, + "seen": 3319121651411945, "timestamp": 1682952384810, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -894,6 +916,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 729, "y": 124, }, + "seen": 6290996447334721, "timestamp": 1682952384811, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -910,6 +933,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 6289157423077161, "timestamp": 1682952385058, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -926,6 +950,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 5317150202362897, "timestamp": 1682952385562, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -936,6 +961,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "source": 2, "type": 6, }, + "seen": 3091503570476556, "timestamp": 1682952385719, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -946,6 +972,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "source": 4, "width": 2560, }, + "seen": 2584127757761616, "timestamp": 1682952385738, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -962,6 +989,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 1875201057400002, "timestamp": 1682952386063, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -984,6 +1012,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 6218302554450745, "timestamp": 1682952386571, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -994,6 +1023,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "href": "http://localhost:3000/", "width": 2560, }, + "seen": 5644389944173152, "timestamp": 1682952388104, "type": 4, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1348,6 +1378,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "type": 0, }, }, + "seen": 3138372698016266, "timestamp": 1682952388106, "type": 2, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1369,6 +1400,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "source": 0, "texts": [], }, + "seen": 2717748427947278, "timestamp": 1682952388108, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1697,6 +1729,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "source": 0, "texts": [], }, + "seen": 7280424110324570, "timestamp": 1682952388117, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1778,6 +1811,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "source": 0, "texts": [], }, + "seen": 6919367212959915, "timestamp": 1682952388132, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1794,6 +1828,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 76365872556484, "timestamp": 1682952388659, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1828,6 +1863,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 395714907704044, "timestamp": 1682952389163, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1880,6 +1916,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh ], "source": 1, }, + "seen": 8416592866543045, "timestamp": 1682952389668, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1892,6 +1929,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852.7421875, "y": 133.1640625, }, + "seen": 3965731883593926, "timestamp": 1682952389698, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1902,6 +1940,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "source": 2, "type": 5, }, + "seen": 4164163026072593, "timestamp": 1682952389699, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1914,6 +1953,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852.7421875, "y": 133.1640625, }, + "seen": 6098664365675746, "timestamp": 1682952389798, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1927,6 +1967,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852, "y": 133, }, + "seen": 5762389377540625, "timestamp": 1682952389798, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1939,6 +1980,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852.7421875, "y": 133.1640625, }, + "seen": 8669833091819132, "timestamp": 1682952389943, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1951,6 +1993,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852.7421875, "y": 133.1640625, }, + "seen": 7827498949680603, "timestamp": 1682952390043, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1964,6 +2007,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852, "y": 133, }, + "seen": 7198721964954330, "timestamp": 1682952390044, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1976,6 +2020,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852, "y": 133, }, + "seen": 6166726337775078, "timestamp": 1682952390047, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1988,6 +2033,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852.7421875, "y": 133.1640625, }, + "seen": 8681720216534728, "timestamp": 1682952390112, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2000,6 +2046,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852.7421875, "y": 133.1640625, }, + "seen": 4356985098874230, "timestamp": 1682952390243, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2013,6 +2060,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "x": 852, "y": 133, }, + "seen": 1432285913547783, "timestamp": 1682952390244, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2023,6 +2071,7 @@ exports[`sessionRecordingDataLogic prepareRecordingSnapshots should match snapsh "source": 2, "type": 6, }, + "seen": 4703642245972871, "timestamp": 1682952392745, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", diff --git a/frontend/src/scenes/session-recordings/player/__snapshots__/sessionRecordingPlayerLogic.test.ts.snap b/frontend/src/scenes/session-recordings/player/__snapshots__/sessionRecordingPlayerLogic.test.ts.snap index 7e1b84825e474..155bfdc8c631f 100644 --- a/frontend/src/scenes/session-recordings/player/__snapshots__/sessionRecordingPlayerLogic.test.ts.snap +++ b/frontend/src/scenes/session-recordings/player/__snapshots__/sessionRecordingPlayerLogic.test.ts.snap @@ -86,6 +86,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "href": "http://localhost:3000/", "width": 2560, }, + "seen": 501012029800196, "timestamp": 1682952380877, "type": 4, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -653,6 +654,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "type": 0, }, }, + "seen": 8726461620907292, "timestamp": 1682952380882, "type": 2, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -669,6 +671,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 8584030046878700, "timestamp": 1682952383040, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -681,6 +684,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 1618.84765625, "y": 299.01953125, }, + "seen": 2483146755249437, "timestamp": 1682952383262, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -693,6 +697,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 1618.84765625, "y": 299.01953125, }, + "seen": 5263782251753321, "timestamp": 1682952383263, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -706,6 +711,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 1618, "y": 299, }, + "seen": 5653094638019907, "timestamp": 1682952383264, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -728,6 +734,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 17060931257009, "timestamp": 1682952383543, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -768,6 +775,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 4557187183717243, "timestamp": 1682952384050, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -780,6 +788,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729.30859375, "y": 124.6875, }, + "seen": 8414661306677587, "timestamp": 1682952384230, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -790,6 +799,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "source": 2, "type": 5, }, + "seen": 5691729520402348, "timestamp": 1682952384231, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -802,6 +812,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729.30859375, "y": 124.5546875, }, + "seen": 5750299534503778, "timestamp": 1682952384310, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -815,6 +826,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729, "y": 124, }, + "seen": 8129303588045202, "timestamp": 1682952384313, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -827,6 +839,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729.30859375, "y": 124.0546875, }, + "seen": 5621966732519651, "timestamp": 1682952384447, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -839,6 +852,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729.30859375, "y": 124.0546875, }, + "seen": 7326349637770734, "timestamp": 1682952384460, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -852,6 +866,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729, "y": 124, }, + "seen": 7654897841603800, "timestamp": 1682952384463, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -864,6 +879,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729, "y": 124, }, + "seen": 6693982823133270, "timestamp": 1682952384464, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -898,6 +914,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 7596817111670310, "timestamp": 1682952384555, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -910,6 +927,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729.30859375, "y": 124.0546875, }, + "seen": 8853173800988607, "timestamp": 1682952384559, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -922,6 +940,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729.30859375, "y": 124.0546875, }, + "seen": 4271865787519747, "timestamp": 1682952384675, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -935,6 +954,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729, "y": 124, }, + "seen": 1674109008838975, "timestamp": 1682952384676, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -947,6 +967,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729.30859375, "y": 124.0546875, }, + "seen": 3659459423609925, "timestamp": 1682952384709, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -959,6 +980,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729.30859375, "y": 124.0546875, }, + "seen": 3319121651411945, "timestamp": 1682952384810, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -972,6 +994,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 729, "y": 124, }, + "seen": 6290996447334721, "timestamp": 1682952384811, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -988,6 +1011,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 6289157423077161, "timestamp": 1682952385058, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -1004,6 +1028,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 5317150202362897, "timestamp": 1682952385562, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -1014,6 +1039,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "source": 2, "type": 6, }, + "seen": 3091503570476556, "timestamp": 1682952385719, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -1024,6 +1050,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "source": 4, "width": 2560, }, + "seen": 2584127757761616, "timestamp": 1682952385738, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -1040,6 +1067,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 1875201057400002, "timestamp": 1682952386063, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -1062,6 +1090,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 6218302554450745, "timestamp": 1682952386571, "type": 3, "windowId": "187d7c761a0525d-05f175487d4b65-1d525634-384000-187d7c761a149d0", @@ -1074,6 +1103,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "href": "http://localhost:3000/", "width": 2560, }, + "seen": 5644389944173152, "timestamp": 1682952388104, "type": 4, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1428,6 +1458,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "type": 0, }, }, + "seen": 3138372698016266, "timestamp": 1682952388106, "type": 2, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1449,6 +1480,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "source": 0, "texts": [], }, + "seen": 2717748427947278, "timestamp": 1682952388108, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1777,6 +1809,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "source": 0, "texts": [], }, + "seen": 7280424110324570, "timestamp": 1682952388117, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1858,6 +1891,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "source": 0, "texts": [], }, + "seen": 6919367212959915, "timestamp": 1682952388132, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1874,6 +1908,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 76365872556484, "timestamp": 1682952388659, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1908,6 +1943,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 395714907704044, "timestamp": 1682952389163, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1960,6 +1996,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna ], "source": 1, }, + "seen": 8416592866543045, "timestamp": 1682952389668, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1972,6 +2009,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852.7421875, "y": 133.1640625, }, + "seen": 3965731883593926, "timestamp": 1682952389698, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1982,6 +2020,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "source": 2, "type": 5, }, + "seen": 4164163026072593, "timestamp": 1682952389699, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -1994,6 +2033,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852.7421875, "y": 133.1640625, }, + "seen": 6098664365675746, "timestamp": 1682952389798, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2007,6 +2047,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852, "y": 133, }, + "seen": 5762389377540625, "timestamp": 1682952389798, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2019,6 +2060,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852.7421875, "y": 133.1640625, }, + "seen": 8669833091819132, "timestamp": 1682952389943, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2031,6 +2073,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852.7421875, "y": 133.1640625, }, + "seen": 7827498949680603, "timestamp": 1682952390043, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2044,6 +2087,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852, "y": 133, }, + "seen": 7198721964954330, "timestamp": 1682952390044, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2056,6 +2100,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852, "y": 133, }, + "seen": 6166726337775078, "timestamp": 1682952390047, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2068,6 +2113,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852.7421875, "y": 133.1640625, }, + "seen": 8681720216534728, "timestamp": 1682952390112, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2080,6 +2126,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852.7421875, "y": 133.1640625, }, + "seen": 4356985098874230, "timestamp": 1682952390243, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2093,6 +2140,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "x": 852, "y": 133, }, + "seen": 1432285913547783, "timestamp": 1682952390244, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", @@ -2103,6 +2151,7 @@ exports[`sessionRecordingPlayerLogic loading session core loads metadata and sna "source": 2, "type": 6, }, + "seen": 4703642245972871, "timestamp": 1682952392745, "type": 3, "windowId": "187d7c77dfe1d45-08bdcaf91135a2-1d525634-384000-187d7c77dff39a6", diff --git a/frontend/src/scenes/session-recordings/player/sessionRecordingDataLogic.ts b/frontend/src/scenes/session-recordings/player/sessionRecordingDataLogic.ts index e8eabbdb645d1..8d630aa10acbb 100644 --- a/frontend/src/scenes/session-recordings/player/sessionRecordingDataLogic.ts +++ b/frontend/src/scenes/session-recordings/player/sessionRecordingDataLogic.ts @@ -125,6 +125,27 @@ const getHrefFromSnapshot = (snapshot: RecordingSnapshot): string | undefined => return (snapshot.data as any)?.href || (snapshot.data as any)?.payload?.href } +/* + cyrb53 (c) 2018 bryc (github.com/bryc) + License: Public domain. Attribution appreciated. + A fast and simple 53-bit string hash function with decent collision resistance. + Largely inspired by MurmurHash2/3, but with a focus on speed/simplicity. +*/ +const cyrb53 = function (str: string, seed = 0): number { + let h1 = 0xdeadbeef ^ seed, + h2 = 0x41c6ce57 ^ seed + for (let i = 0, ch; i < str.length; i++) { + ch = str.charCodeAt(i) + h1 = Math.imul(h1 ^ ch, 2654435761) + h2 = Math.imul(h2 ^ ch, 1597334677) + } + h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) + h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909) + h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) + h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909) + return 4294967296 * (2097151 & h2) + (h1 >>> 0) +} + export const deduplicateSnapshots = ( newSnapshots?: RecordingSnapshot[], existingSnapshots?: RecordingSnapshot[] @@ -141,7 +162,11 @@ export const deduplicateSnapshots = ( // we can see duplicates that only differ by delay - these still count as duplicates // even though the delay would hide that const { delay: _delay, ...delayFreeSnapshot } = snapshot - const key = JSON.stringify(delayFreeSnapshot) + // we check each item multiple times as new snapshots come in + // so store the computer value on the object to save recalculating it so much + const key = (snapshot as any).seen || cyrb53(JSON.stringify(delayFreeSnapshot)) + ;(snapshot as any).seen = key + if (seenHashes.has(key)) { return false } else {