@sentry/replay 7.67.0 → 7.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/types-ts3.8/constants.d.ts +25 -0
- package/types-ts3.8/coreHandlers/handleAfterSendEvent.d.ts +9 -0
- package/types-ts3.8/coreHandlers/handleClick.d.ts +39 -0
- package/types-ts3.8/coreHandlers/handleDom.d.ts +13 -0
- package/types-ts3.8/coreHandlers/handleFetch.d.ts +9 -0
- package/types-ts3.8/coreHandlers/handleGlobalEvent.d.ts +7 -0
- package/types-ts3.8/coreHandlers/handleHistory.d.ts +11 -0
- package/types-ts3.8/coreHandlers/handleKeyboardEvent.d.ts +7 -0
- package/types-ts3.8/coreHandlers/handleNetworkBreadcrumbs.d.ts +17 -0
- package/types-ts3.8/coreHandlers/handleScope.d.ts +13 -0
- package/types-ts3.8/coreHandlers/handleXhr.d.ts +9 -0
- package/types-ts3.8/coreHandlers/performanceObserver.d.ts +6 -0
- package/types-ts3.8/coreHandlers/util/addBreadcrumbEvent.d.ts +7 -0
- package/types-ts3.8/coreHandlers/util/addNetworkBreadcrumb.d.ts +4 -0
- package/types-ts3.8/coreHandlers/util/domUtils.d.ts +19 -0
- package/types-ts3.8/coreHandlers/util/fetchUtils.d.ts +23 -0
- package/types-ts3.8/coreHandlers/util/getAttributesToRecord.d.ts +5 -0
- package/types-ts3.8/coreHandlers/util/networkUtils.d.ts +23 -0
- package/types-ts3.8/coreHandlers/util/onWindowOpen.d.ts +8 -0
- package/types-ts3.8/coreHandlers/util/shouldSampleForBufferEvent.d.ts +9 -0
- package/types-ts3.8/coreHandlers/util/xhrUtils.d.ts +22 -0
- package/types-ts3.8/eventBuffer/EventBufferArray.d.ts +28 -0
- package/types-ts3.8/eventBuffer/EventBufferCompressionWorker.d.ts +50 -0
- package/types-ts3.8/eventBuffer/EventBufferProxy.d.ts +42 -0
- package/types-ts3.8/eventBuffer/WorkerHandler.d.ts +27 -0
- package/types-ts3.8/eventBuffer/error.d.ts +5 -0
- package/types-ts3.8/eventBuffer/index.d.ts +10 -0
- package/types-ts3.8/index.d.ts +4 -0
- package/types-ts3.8/integration.d.ts +73 -0
- package/types-ts3.8/replay.d.ts +308 -0
- package/types-ts3.8/session/Session.d.ts +8 -0
- package/types-ts3.8/session/clearSession.d.ts +6 -0
- package/types-ts3.8/session/createSession.d.ts +14 -0
- package/types-ts3.8/session/fetchSession.d.ts +6 -0
- package/types-ts3.8/session/index.d.ts +2 -0
- package/types-ts3.8/session/loadOrCreateSession.d.ts +11 -0
- package/types-ts3.8/session/maybeRefreshSession.d.ts +12 -0
- package/types-ts3.8/session/saveSession.d.ts +6 -0
- package/types-ts3.8/types/deprecated.d.ts +16 -0
- package/types-ts3.8/types/index.d.ts +6 -0
- package/types-ts3.8/types/performance.d.ts +124 -0
- package/types-ts3.8/types/replay.d.ts +422 -0
- package/types-ts3.8/types/replayFrame.d.ts +173 -0
- package/types-ts3.8/types/request.d.ts +15 -0
- package/types-ts3.8/types/rrweb.d.ts +37 -0
- package/types-ts3.8/util/addEvent.d.ts +7 -0
- package/types-ts3.8/util/addGlobalListeners.d.ts +6 -0
- package/types-ts3.8/util/addMemoryEntry.d.ts +7 -0
- package/types-ts3.8/util/createBreadcrumb.d.ts +6 -0
- package/types-ts3.8/util/createPerformanceEntries.d.ts +6 -0
- package/types-ts3.8/util/createPerformanceSpans.d.ts +6 -0
- package/types-ts3.8/util/createReplayEnvelope.d.ts +7 -0
- package/types-ts3.8/util/debounce.d.ts +30 -0
- package/types-ts3.8/util/dedupePerformanceEntries.d.ts +11 -0
- package/types-ts3.8/util/eventUtils.d.ts +8 -0
- package/types-ts3.8/util/getPrivacyOptions.d.ts +19 -0
- package/types-ts3.8/util/handleRecordingEmit.d.ts +14 -0
- package/types-ts3.8/util/hasSessionStorage.d.ts +3 -0
- package/types-ts3.8/util/isBrowser.d.ts +5 -0
- package/types-ts3.8/util/isExpired.d.ts +6 -0
- package/types-ts3.8/util/isRrwebError.d.ts +6 -0
- package/types-ts3.8/util/isSampled.d.ts +8 -0
- package/types-ts3.8/util/isSessionExpired.d.ts +10 -0
- package/types-ts3.8/util/log.d.ts +10 -0
- package/types-ts3.8/util/prepareRecordingData.d.ts +9 -0
- package/types-ts3.8/util/prepareReplayEvent.d.ts +15 -0
- package/types-ts3.8/util/sendReplay.d.ts +9 -0
- package/types-ts3.8/util/sendReplayRequest.d.ts +13 -0
- package/types-ts3.8/util/shouldFilterRequest.d.ts +7 -0
- package/types-ts3.8/util/throttle.d.ts +12 -0
- package/types-ts3.8/util/timestamp.d.ts +9 -0
- package/types-ts3.8/util/truncateJson/completeJson.d.ts +9 -0
- package/types-ts3.8/util/truncateJson/constants.d.ts +12 -0
- package/types-ts3.8/util/truncateJson/evaluateJson.d.ts +6 -0
- package/types-ts3.8/util/truncateJson/fixJson.d.ts +6 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { ReplayRecordingMode, Transaction } from '@sentry/types';
|
|
2
|
+
import { ClickDetector } from './coreHandlers/handleClick';
|
|
3
|
+
import { AddEventResult, AddUpdateCallback, AllPerformanceEntry, EventBuffer, InternalEventContext, RecordingEvent, RecordingOptions, ReplayContainer as ReplayContainerInterface, ReplayPluginOptions, SendBufferedReplayOptions, Session, Timeouts } from './types';
|
|
4
|
+
import { SKIPPED } from './util/throttle';
|
|
5
|
+
import { THROTTLED } from './util/throttle';
|
|
6
|
+
/**
|
|
7
|
+
* The main replay container class, which holds all the state and methods for recording and sending replays.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ReplayContainer implements ReplayContainerInterface {
|
|
10
|
+
eventBuffer: EventBuffer | null;
|
|
11
|
+
/**
|
|
12
|
+
* List of PerformanceEntry from PerformanceObserver
|
|
13
|
+
*/
|
|
14
|
+
performanceEvents: AllPerformanceEntry[];
|
|
15
|
+
session: Session | undefined;
|
|
16
|
+
clickDetector: ClickDetector | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Recording can happen in one of three modes:
|
|
19
|
+
* - session: Record the whole session, sending it continuously
|
|
20
|
+
* - buffer: Always keep the last 60s of recording, requires:
|
|
21
|
+
* - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs
|
|
22
|
+
* - or calling `flush()` to send the replay
|
|
23
|
+
*/
|
|
24
|
+
recordingMode: ReplayRecordingMode;
|
|
25
|
+
/**
|
|
26
|
+
* The current or last active transcation.
|
|
27
|
+
* This is only available when performance is enabled.
|
|
28
|
+
*/
|
|
29
|
+
lastTransaction?: Transaction;
|
|
30
|
+
/**
|
|
31
|
+
* These are here so we can overwrite them in tests etc.
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
readonly timeouts: Timeouts;
|
|
35
|
+
private _throttledAddEvent;
|
|
36
|
+
/**
|
|
37
|
+
* Options to pass to `rrweb.record()`
|
|
38
|
+
*/
|
|
39
|
+
private readonly _recordingOptions;
|
|
40
|
+
private readonly _options;
|
|
41
|
+
private _performanceObserver;
|
|
42
|
+
private _debouncedFlush;
|
|
43
|
+
private _flushLock;
|
|
44
|
+
/**
|
|
45
|
+
* Timestamp of the last user activity. This lives across sessions.
|
|
46
|
+
*/
|
|
47
|
+
private _lastActivity;
|
|
48
|
+
/**
|
|
49
|
+
* Is the integration currently active?
|
|
50
|
+
*/
|
|
51
|
+
private _isEnabled;
|
|
52
|
+
/**
|
|
53
|
+
* Paused is a state where:
|
|
54
|
+
* - DOM Recording is not listening at all
|
|
55
|
+
* - Nothing will be added to event buffer (e.g. core SDK events)
|
|
56
|
+
*/
|
|
57
|
+
private _isPaused;
|
|
58
|
+
/**
|
|
59
|
+
* Have we attached listeners to the core SDK?
|
|
60
|
+
* Note we have to track this as there is no way to remove instrumentation handlers.
|
|
61
|
+
*/
|
|
62
|
+
private _hasInitializedCoreListeners;
|
|
63
|
+
/**
|
|
64
|
+
* Function to stop recording
|
|
65
|
+
*/
|
|
66
|
+
private _stopRecording;
|
|
67
|
+
private _context;
|
|
68
|
+
constructor({ options, recordingOptions, }: {
|
|
69
|
+
options: ReplayPluginOptions;
|
|
70
|
+
recordingOptions: RecordingOptions;
|
|
71
|
+
});
|
|
72
|
+
/** Get the event context. */
|
|
73
|
+
getContext(): InternalEventContext;
|
|
74
|
+
/** If recording is currently enabled. */
|
|
75
|
+
isEnabled(): boolean;
|
|
76
|
+
/** If recording is currently paused. */
|
|
77
|
+
isPaused(): boolean;
|
|
78
|
+
/** Get the replay integration options. */
|
|
79
|
+
getOptions(): ReplayPluginOptions;
|
|
80
|
+
/**
|
|
81
|
+
* Initializes the plugin based on sampling configuration. Should not be
|
|
82
|
+
* called outside of constructor.
|
|
83
|
+
*/
|
|
84
|
+
initializeSampling(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Start a replay regardless of sampling rate. Calling this will always
|
|
87
|
+
* create a new session. Will throw an error if replay is already in progress.
|
|
88
|
+
*
|
|
89
|
+
* Creates or loads a session, attaches listeners to varying events (DOM,
|
|
90
|
+
* _performanceObserver, Recording, Sentry SDK, etc)
|
|
91
|
+
*/
|
|
92
|
+
start(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Start replay buffering. Buffers until `flush()` is called or, if
|
|
95
|
+
* `replaysOnErrorSampleRate` > 0, an error occurs.
|
|
96
|
+
*/
|
|
97
|
+
startBuffering(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Start recording.
|
|
100
|
+
*
|
|
101
|
+
* Note that this will cause a new DOM checkout
|
|
102
|
+
*/
|
|
103
|
+
startRecording(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Stops the recording, if it was running.
|
|
106
|
+
*
|
|
107
|
+
* Returns true if it was previously stopped, or is now stopped,
|
|
108
|
+
* otherwise false.
|
|
109
|
+
*/
|
|
110
|
+
stopRecording(): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Currently, this needs to be manually called (e.g. for tests). Sentry SDK
|
|
113
|
+
* does not support a teardown
|
|
114
|
+
*/
|
|
115
|
+
stop({ forceFlush, reason }?: {
|
|
116
|
+
forceFlush?: boolean;
|
|
117
|
+
reason?: string;
|
|
118
|
+
}): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Pause some replay functionality. See comments for `_isPaused`.
|
|
121
|
+
* This differs from stop as this only stops DOM recording, it is
|
|
122
|
+
* not as thorough of a shutdown as `stop()`.
|
|
123
|
+
*/
|
|
124
|
+
pause(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Resumes recording, see notes for `pause().
|
|
127
|
+
*
|
|
128
|
+
* Note that calling `startRecording()` here will cause a
|
|
129
|
+
* new DOM checkout.`
|
|
130
|
+
*/
|
|
131
|
+
resume(): void;
|
|
132
|
+
/**
|
|
133
|
+
* If not in "session" recording mode, flush event buffer which will create a new replay.
|
|
134
|
+
* Unless `continueRecording` is false, the replay will continue to record and
|
|
135
|
+
* behave as a "session"-based replay.
|
|
136
|
+
*
|
|
137
|
+
* Otherwise, queue up a flush.
|
|
138
|
+
*/
|
|
139
|
+
sendBufferedReplayOrFlush({ continueRecording }?: SendBufferedReplayOptions): Promise<void>;
|
|
140
|
+
/**
|
|
141
|
+
* We want to batch uploads of replay events. Save events only if
|
|
142
|
+
* `<flushMinDelay>` milliseconds have elapsed since the last event
|
|
143
|
+
* *OR* if `<flushMaxDelay>` milliseconds have elapsed.
|
|
144
|
+
*
|
|
145
|
+
* Accepts a callback to perform side-effects and returns true to stop batch
|
|
146
|
+
* processing and hand back control to caller.
|
|
147
|
+
*/
|
|
148
|
+
addUpdate(cb: AddUpdateCallback): void;
|
|
149
|
+
/**
|
|
150
|
+
* Updates the user activity timestamp and resumes recording. This should be
|
|
151
|
+
* called in an event handler for a user action that we consider as the user
|
|
152
|
+
* being "active" (e.g. a mouse click).
|
|
153
|
+
*/
|
|
154
|
+
triggerUserActivity(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Updates the user activity timestamp *without* resuming
|
|
157
|
+
* recording. Some user events (e.g. keydown) can be create
|
|
158
|
+
* low-value replays that only contain the keypress as a
|
|
159
|
+
* breadcrumb. Instead this would require other events to
|
|
160
|
+
* create a new replay after a session has expired.
|
|
161
|
+
*/
|
|
162
|
+
updateUserActivity(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Only flush if `this.recordingMode === 'session'`
|
|
165
|
+
*/
|
|
166
|
+
conditionalFlush(): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Flush using debounce flush
|
|
169
|
+
*/
|
|
170
|
+
flush(): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Always flush via `_debouncedFlush` so that we do not have flushes triggered
|
|
173
|
+
* from calling both `flush` and `_debouncedFlush`. Otherwise, there could be
|
|
174
|
+
* cases of mulitple flushes happening closely together.
|
|
175
|
+
*/
|
|
176
|
+
flushImmediate(): Promise<void>;
|
|
177
|
+
/**
|
|
178
|
+
* Cancels queued up flushes.
|
|
179
|
+
*/
|
|
180
|
+
cancelFlush(): void;
|
|
181
|
+
/** Get the current sesion (=replay) ID */
|
|
182
|
+
getSessionId(): string | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* Checks if recording should be stopped due to user inactivity. Otherwise
|
|
185
|
+
* check if session is expired and create a new session if so. Triggers a new
|
|
186
|
+
* full snapshot on new session.
|
|
187
|
+
*
|
|
188
|
+
* Returns true if session is not expired, false otherwise.
|
|
189
|
+
* @hidden
|
|
190
|
+
*/
|
|
191
|
+
checkAndHandleExpiredSession(): boolean | void;
|
|
192
|
+
/**
|
|
193
|
+
* Capture some initial state that can change throughout the lifespan of the
|
|
194
|
+
* replay. This is required because otherwise they would be captured at the
|
|
195
|
+
* first flush.
|
|
196
|
+
*/
|
|
197
|
+
setInitialState(): void;
|
|
198
|
+
/**
|
|
199
|
+
* Add a breadcrumb event, that may be throttled.
|
|
200
|
+
* If it was throttled, we add a custom breadcrumb to indicate that.
|
|
201
|
+
*/
|
|
202
|
+
throttledAddEvent(event: RecordingEvent, isCheckout?: boolean): typeof THROTTLED | typeof SKIPPED | Promise<AddEventResult | null>;
|
|
203
|
+
/**
|
|
204
|
+
* This will get the parametrized route name of the current page.
|
|
205
|
+
* This is only available if performance is enabled, and if an instrumented router is used.
|
|
206
|
+
*/
|
|
207
|
+
getCurrentRoute(): string | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* Initialize and start all listeners to varying events (DOM,
|
|
210
|
+
* Performance Observer, Recording, Sentry SDK, etc)
|
|
211
|
+
*/
|
|
212
|
+
private _initializeRecording;
|
|
213
|
+
/** A wrapper to conditionally capture exceptions. */
|
|
214
|
+
private _handleException;
|
|
215
|
+
/**
|
|
216
|
+
* Loads (or refreshes) the current session.
|
|
217
|
+
*/
|
|
218
|
+
private _initializeSessionForSampling;
|
|
219
|
+
/**
|
|
220
|
+
* Checks and potentially refreshes the current session.
|
|
221
|
+
* Returns false if session is not recorded.
|
|
222
|
+
*/
|
|
223
|
+
private _checkSession;
|
|
224
|
+
/**
|
|
225
|
+
* Adds listeners to record events for the replay
|
|
226
|
+
*/
|
|
227
|
+
private _addListeners;
|
|
228
|
+
/**
|
|
229
|
+
* Cleans up listeners that were created in `_addListeners`
|
|
230
|
+
*/
|
|
231
|
+
private _removeListeners;
|
|
232
|
+
/**
|
|
233
|
+
* Handle when visibility of the page content changes. Opening a new tab will
|
|
234
|
+
* cause the state to change to hidden because of content of current page will
|
|
235
|
+
* be hidden. Likewise, moving a different window to cover the contents of the
|
|
236
|
+
* page will also trigger a change to a hidden state.
|
|
237
|
+
*/
|
|
238
|
+
private _handleVisibilityChange;
|
|
239
|
+
/**
|
|
240
|
+
* Handle when page is blurred
|
|
241
|
+
*/
|
|
242
|
+
private _handleWindowBlur;
|
|
243
|
+
/**
|
|
244
|
+
* Handle when page is focused
|
|
245
|
+
*/
|
|
246
|
+
private _handleWindowFocus;
|
|
247
|
+
/** Ensure page remains active when a key is pressed. */
|
|
248
|
+
private _handleKeyboardEvent;
|
|
249
|
+
/**
|
|
250
|
+
* Tasks to run when we consider a page to be hidden (via blurring and/or visibility)
|
|
251
|
+
*/
|
|
252
|
+
private _doChangeToBackgroundTasks;
|
|
253
|
+
/**
|
|
254
|
+
* Tasks to run when we consider a page to be visible (via focus and/or visibility)
|
|
255
|
+
*/
|
|
256
|
+
private _doChangeToForegroundTasks;
|
|
257
|
+
/**
|
|
258
|
+
* Trigger rrweb to take a full snapshot which will cause this plugin to
|
|
259
|
+
* create a new Replay event.
|
|
260
|
+
*/
|
|
261
|
+
private _triggerFullSnapshot;
|
|
262
|
+
/**
|
|
263
|
+
* Update user activity (across session lifespans)
|
|
264
|
+
*/
|
|
265
|
+
private _updateUserActivity;
|
|
266
|
+
/**
|
|
267
|
+
* Updates the session's last activity timestamp
|
|
268
|
+
*/
|
|
269
|
+
private _updateSessionActivity;
|
|
270
|
+
/**
|
|
271
|
+
* Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb
|
|
272
|
+
*/
|
|
273
|
+
private _createCustomBreadcrumb;
|
|
274
|
+
/**
|
|
275
|
+
* Observed performance events are added to `this.performanceEvents`. These
|
|
276
|
+
* are included in the replay event before it is finished and sent to Sentry.
|
|
277
|
+
*/
|
|
278
|
+
private _addPerformanceEntries;
|
|
279
|
+
/**
|
|
280
|
+
* Clear _context
|
|
281
|
+
*/
|
|
282
|
+
private _clearContext;
|
|
283
|
+
/** Update the initial timestamp based on the buffer content. */
|
|
284
|
+
private _updateInitialTimestampFromEventBuffer;
|
|
285
|
+
/**
|
|
286
|
+
* Return and clear _context
|
|
287
|
+
*/
|
|
288
|
+
private _popEventContext;
|
|
289
|
+
/**
|
|
290
|
+
* Flushes replay event buffer to Sentry.
|
|
291
|
+
*
|
|
292
|
+
* Performance events are only added right before flushing - this is
|
|
293
|
+
* due to the buffered performance observer events.
|
|
294
|
+
*
|
|
295
|
+
* Should never be called directly, only by `flush`
|
|
296
|
+
*/
|
|
297
|
+
private _runFlush;
|
|
298
|
+
/**
|
|
299
|
+
* Flush recording data to Sentry. Creates a lock so that only a single flush
|
|
300
|
+
* can be active at a time. Do not call this directly.
|
|
301
|
+
*/
|
|
302
|
+
private _flush;
|
|
303
|
+
/** Save the session, if it is sticky */
|
|
304
|
+
private _maybeSaveSession;
|
|
305
|
+
/** Handler for rrweb.record.onMutation */
|
|
306
|
+
private _onMutationHandler;
|
|
307
|
+
}
|
|
308
|
+
//# sourceMappingURL=replay.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Sampled, Session, SessionOptions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Get the sampled status for a session based on sample rates & current sampled status.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getSessionSampleType(sessionSampleRate: number, allowBuffering: boolean): Sampled;
|
|
6
|
+
/**
|
|
7
|
+
* Create a new session, which in its current implementation is a Sentry event
|
|
8
|
+
* that all replays will be saved to as attachments. Currently, we only expect
|
|
9
|
+
* one of these Sentry events per "replay session".
|
|
10
|
+
*/
|
|
11
|
+
export declare function createSession({ sessionSampleRate, allowBuffering, stickySession }: SessionOptions, { previousSessionId }?: {
|
|
12
|
+
previousSessionId?: string;
|
|
13
|
+
}): Session;
|
|
14
|
+
//# sourceMappingURL=createSession.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Session, SessionOptions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Get or create a session, when initializing the replay.
|
|
4
|
+
* Returns a session that may be unsampled.
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadOrCreateSession(currentSession: Session | undefined, { traceInternals, sessionIdleExpire, maxReplayDuration, }: {
|
|
7
|
+
sessionIdleExpire: number;
|
|
8
|
+
maxReplayDuration: number;
|
|
9
|
+
traceInternals?: boolean;
|
|
10
|
+
}, sessionOptions: SessionOptions): Session;
|
|
11
|
+
//# sourceMappingURL=loadOrCreateSession.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Session, SessionOptions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Check a session, and either return it or a refreshed version of it.
|
|
4
|
+
* The refreshed version may be unsampled.
|
|
5
|
+
* You can check if the session has changed by comparing the session IDs.
|
|
6
|
+
*/
|
|
7
|
+
export declare function maybeRefreshSession(session: Session, { traceInternals, maxReplayDuration, sessionIdleExpire, }: {
|
|
8
|
+
sessionIdleExpire: number;
|
|
9
|
+
maxReplayDuration: number;
|
|
10
|
+
traceInternals?: boolean;
|
|
11
|
+
}, sessionOptions: SessionOptions): Session;
|
|
12
|
+
//# sourceMappingURL=maybeRefreshSession.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReplayBreadcrumbFrame, ReplayBreadcrumbFrameEvent, ReplayEventType, ReplayEventWithTime, ReplayOptionFrameEvent, ReplaySpanFrame, ReplaySpanFrameEvent } from '.';
|
|
2
|
+
/** @deprecated use ReplayEventType instead */
|
|
3
|
+
export type EventType = ReplayEventType;
|
|
4
|
+
/** @deprecated use ReplayEventWithTime instead */
|
|
5
|
+
export type eventWithTime = ReplayEventWithTime;
|
|
6
|
+
/** @deprecated use ReplayBreadcrumbFrame instead */
|
|
7
|
+
export type BreadcrumbFrame = ReplayBreadcrumbFrame;
|
|
8
|
+
/** @deprecated use ReplayBreadcrumbFrameEvent instead */
|
|
9
|
+
export type BreadcrumbFrameEvent = ReplayBreadcrumbFrameEvent;
|
|
10
|
+
/** @deprecated use ReplayOptionFrameEvent instead */
|
|
11
|
+
export type OptionFrameEvent = ReplayOptionFrameEvent;
|
|
12
|
+
/** @deprecated use ReplaySpanFrame instead */
|
|
13
|
+
export type SpanFrame = ReplaySpanFrame;
|
|
14
|
+
/** @deprecated use ReplaySpanFrameEvent instead */
|
|
15
|
+
export type SpanFrameEvent = ReplaySpanFrameEvent;
|
|
16
|
+
//# sourceMappingURL=deprecated.d.ts.map
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ReplayNetworkRequestOrResponse } from './request';
|
|
2
|
+
export type AllPerformanceEntry = PerformancePaintTiming | PerformanceResourceTiming | PerformanceNavigationTiming;
|
|
3
|
+
export type PerformancePaintTiming = PerformanceEntry;
|
|
4
|
+
export type PerformanceNavigationTiming = PerformanceEntry & PerformanceResourceTiming & {
|
|
5
|
+
type: string;
|
|
6
|
+
transferSize: number;
|
|
7
|
+
/**
|
|
8
|
+
* A DOMHighResTimeStamp representing the time immediately before the user agent
|
|
9
|
+
* sets the document's readyState to "interactive".
|
|
10
|
+
*/
|
|
11
|
+
domInteractive: number;
|
|
12
|
+
/**
|
|
13
|
+
* A DOMHighResTimeStamp representing the time immediately before the current
|
|
14
|
+
* document's DOMContentLoaded event handler starts.
|
|
15
|
+
*/
|
|
16
|
+
domContentLoadedEventStart: number;
|
|
17
|
+
/**
|
|
18
|
+
* A DOMHighResTimeStamp representing the time immediately after the current
|
|
19
|
+
* document's DOMContentLoaded event handler completes.
|
|
20
|
+
*/
|
|
21
|
+
domContentLoadedEventEnd: number;
|
|
22
|
+
/**
|
|
23
|
+
* A DOMHighResTimeStamp representing the time immediately before the current
|
|
24
|
+
* document's load event handler starts.
|
|
25
|
+
*/
|
|
26
|
+
loadEventStart: number;
|
|
27
|
+
/**
|
|
28
|
+
* A DOMHighResTimeStamp representing the time immediately after the current
|
|
29
|
+
* document's load event handler completes.
|
|
30
|
+
*/
|
|
31
|
+
loadEventEnd: number;
|
|
32
|
+
/**
|
|
33
|
+
* A DOMHighResTimeStamp representing the time immediately before the user agent
|
|
34
|
+
* sets the document's readyState to "complete".
|
|
35
|
+
*/
|
|
36
|
+
domComplete: number;
|
|
37
|
+
/**
|
|
38
|
+
* A number representing the number of redirects since the last non-redirect
|
|
39
|
+
* navigation in the current browsing context.
|
|
40
|
+
*/
|
|
41
|
+
redirectCount: number;
|
|
42
|
+
};
|
|
43
|
+
export type ExperimentalPerformanceResourceTiming = PerformanceResourceTiming & {
|
|
44
|
+
responseStatus?: number;
|
|
45
|
+
};
|
|
46
|
+
export type PaintData = undefined;
|
|
47
|
+
/**
|
|
48
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming
|
|
49
|
+
*
|
|
50
|
+
* Note `navigation.push` will not have any data
|
|
51
|
+
*/
|
|
52
|
+
export type NavigationData = Partial<Pick<PerformanceNavigationTiming, 'decodedBodySize' | 'encodedBodySize' | 'duration' | 'domInteractive' | 'domContentLoadedEventEnd' | 'domContentLoadedEventStart' | 'loadEventStart' | 'loadEventEnd' | 'domComplete' | 'redirectCount'>> & {
|
|
53
|
+
/**
|
|
54
|
+
* Transfer size of resource
|
|
55
|
+
*/
|
|
56
|
+
size?: number;
|
|
57
|
+
};
|
|
58
|
+
export type ResourceData = Pick<PerformanceResourceTiming, 'decodedBodySize' | 'encodedBodySize'> & {
|
|
59
|
+
/**
|
|
60
|
+
* Transfer size of resource
|
|
61
|
+
*/
|
|
62
|
+
size: number;
|
|
63
|
+
/**
|
|
64
|
+
* HTTP status code. Note this is experimental and not available on all browsers.
|
|
65
|
+
*/
|
|
66
|
+
statusCode?: number;
|
|
67
|
+
};
|
|
68
|
+
export interface LargestContentfulPaintData {
|
|
69
|
+
/**
|
|
70
|
+
* Render time (in ms) of the LCP
|
|
71
|
+
*/
|
|
72
|
+
value: number;
|
|
73
|
+
size: number;
|
|
74
|
+
/**
|
|
75
|
+
* The recording id of the LCP node. -1 if not found
|
|
76
|
+
*/
|
|
77
|
+
nodeId?: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Entries that come from window.performance
|
|
81
|
+
*/
|
|
82
|
+
export type AllPerformanceEntryData = PaintData | NavigationData | ResourceData | LargestContentfulPaintData;
|
|
83
|
+
export interface MemoryData {
|
|
84
|
+
memory: {
|
|
85
|
+
jsHeapSizeLimit: number;
|
|
86
|
+
totalJSHeapSize: number;
|
|
87
|
+
usedJSHeapSize: number;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export interface NetworkRequestData {
|
|
91
|
+
method?: string;
|
|
92
|
+
statusCode?: number;
|
|
93
|
+
requestBodySize?: number;
|
|
94
|
+
responseBodySize?: number;
|
|
95
|
+
request?: ReplayNetworkRequestOrResponse;
|
|
96
|
+
response?: ReplayNetworkRequestOrResponse;
|
|
97
|
+
}
|
|
98
|
+
export interface HistoryData {
|
|
99
|
+
previous: string;
|
|
100
|
+
}
|
|
101
|
+
export type AllEntryData = AllPerformanceEntryData | MemoryData | NetworkRequestData | HistoryData;
|
|
102
|
+
export interface ReplayPerformanceEntry<T> {
|
|
103
|
+
/**
|
|
104
|
+
* One of these types https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/entryType
|
|
105
|
+
*/
|
|
106
|
+
type: string;
|
|
107
|
+
/**
|
|
108
|
+
* A more specific description of the performance entry
|
|
109
|
+
*/
|
|
110
|
+
name: string;
|
|
111
|
+
/**
|
|
112
|
+
* The start timestamp in seconds
|
|
113
|
+
*/
|
|
114
|
+
start: number;
|
|
115
|
+
/**
|
|
116
|
+
* The end timestamp in seconds
|
|
117
|
+
*/
|
|
118
|
+
end: number;
|
|
119
|
+
/**
|
|
120
|
+
* Additional unstructured data to be included
|
|
121
|
+
*/
|
|
122
|
+
data: T;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=performance.d.ts.map
|