You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constfirstTimestamp=firstEventTimestamp||this.timeKeeper.correctAbsoluteTimestamp(recorderEvents.cycleTimestamp)// from rrweb node || from when the harvest cycle started
Copy file name to clipboardExpand all lines: src/features/session_replay/shared/recorder-events.js
+6-1
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,16 @@
1
1
exportclassRecorderEvents{
2
-
constructor(){
2
+
constructor({ canCorrectTimestamps }){
3
3
/** The buffer to hold recorder event nodes */
4
4
this.events=[]
5
5
/** Payload metadata -- Should indicate when a replay blob started recording. Resets each time a harvest occurs.
6
6
* cycle timestamps are used as fallbacks if event timestamps cannot be used
7
7
*/
8
8
this.cycleTimestamp=Date.now()
9
+
/** Payload metadata -- Whether timestamps can be corrected, defaults as false, can be set to true if timekeeper is present at init time. Used to determine
10
+
* if harvest needs to re-loop through nodes and correct them before sending. Ideal behavior is to correct them as they flow into the recorder
11
+
* to prevent re-looping, but is not always possible since the timekeeper is not set until after page load and the recorder can be preloaded.
12
+
*/
13
+
this.canCorrectTimestamps=!!canCorrectTimestamps
9
14
/** A value which increments with every new mutation node reported. Resets after a harvest is sent */
10
15
this.payloadBytesEstimation=0
11
16
/** Payload metadata -- Should indicate that the payload being sent has a full DOM snapshot. This can happen
0 commit comments