@sentry/replay 0.6.10 → 0.6.11

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.
Files changed (76) hide show
  1. package/README.md +10 -7
  2. package/dist/index.es.js +99 -47
  3. package/dist/index.js +98 -46
  4. package/dist/index.js.map +1 -1
  5. package/dist/types/src/index.d.ts +8 -4
  6. package/dist/types/src/session/Session.d.ts +4 -6
  7. package/dist/types/src/session/constants.d.ts +5 -0
  8. package/dist/types/src/session/createSession.d.ts +2 -13
  9. package/dist/types/src/session/fetchSession.d.ts +2 -1
  10. package/dist/types/src/session/getSession.d.ts +3 -11
  11. package/dist/types/src/types.d.ts +39 -13
  12. package/dist/types/src/util/isSampled.d.ts +1 -1
  13. package/package.json +1 -1
  14. package/dist/config/types/jest.config.d.ts +0 -3
  15. package/dist/config/types/jest.setup.d.ts +0 -32
  16. package/dist/config/types/src/blockAllMedia.test.d.ts +0 -1
  17. package/dist/config/types/src/coreHandlers/getBreadcrumbHandler.d.ts +0 -3
  18. package/dist/config/types/src/coreHandlers/getSpanHandler.d.ts +0 -5
  19. package/dist/config/types/src/coreHandlers/handleDom.d.ts +0 -1
  20. package/dist/config/types/src/coreHandlers/handleFetch.d.ts +0 -19
  21. package/dist/config/types/src/coreHandlers/handleFetch.test.d.ts +0 -1
  22. package/dist/config/types/src/coreHandlers/handleHistory.d.ts +0 -7
  23. package/dist/config/types/src/coreHandlers/handleScope-unit.test.d.ts +0 -1
  24. package/dist/config/types/src/coreHandlers/handleScope.d.ts +0 -2
  25. package/dist/config/types/src/coreHandlers/handleScope.test.d.ts +0 -1
  26. package/dist/config/types/src/coreHandlers/handleXhr.d.ts +0 -21
  27. package/dist/config/types/src/createPerformanceEntry.d.ts +0 -43
  28. package/dist/config/types/src/createPerformanceEntry.test.d.ts +0 -1
  29. package/dist/config/types/src/eventBuffer.d.ts +0 -45
  30. package/dist/config/types/src/eventBuffer.test.d.ts +0 -1
  31. package/dist/config/types/src/flags.d.ts +0 -2
  32. package/dist/config/types/src/flush.test.d.ts +0 -1
  33. package/dist/config/types/src/index-captureOnlyOnError.test.d.ts +0 -1
  34. package/dist/config/types/src/index-noSticky.test.d.ts +0 -1
  35. package/dist/config/types/src/index-sampling.test.d.ts +0 -1
  36. package/dist/config/types/src/index.d.ts +0 -289
  37. package/dist/config/types/src/index.test.d.ts +0 -1
  38. package/dist/config/types/src/multiple-instances.test.d.ts +0 -1
  39. package/dist/config/types/src/session/Session.d.ts +0 -63
  40. package/dist/config/types/src/session/Session.test.d.ts +0 -1
  41. package/dist/config/types/src/session/constants.d.ts +0 -6
  42. package/dist/config/types/src/session/createSession.d.ts +0 -19
  43. package/dist/config/types/src/session/createSession.test.d.ts +0 -1
  44. package/dist/config/types/src/session/deleteSession.d.ts +0 -4
  45. package/dist/config/types/src/session/deleteSession.test.d.ts +0 -1
  46. package/dist/config/types/src/session/fetchSession.d.ts +0 -5
  47. package/dist/config/types/src/session/fetchSession.test.d.ts +0 -1
  48. package/dist/config/types/src/session/getSession.d.ts +0 -28
  49. package/dist/config/types/src/session/getSession.test.d.ts +0 -1
  50. package/dist/config/types/src/session/index.d.ts +0 -1
  51. package/dist/config/types/src/session/saveSession.d.ts +0 -2
  52. package/dist/config/types/src/session/saveSession.test.d.ts +0 -1
  53. package/dist/config/types/src/stop.test.d.ts +0 -1
  54. package/dist/config/types/src/types.d.ts +0 -105
  55. package/dist/config/types/src/util/addInternalBreadcrumb.d.ts +0 -5
  56. package/dist/config/types/src/util/captureInternalException.d.ts +0 -4
  57. package/dist/config/types/src/util/createBreadcrumb.d.ts +0 -4
  58. package/dist/config/types/src/util/createPayload.d.ts +0 -5
  59. package/dist/config/types/src/util/dedupePerformanceEntries.d.ts +0 -10
  60. package/dist/config/types/src/util/dedupePerformanceEntries.test.d.ts +0 -1
  61. package/dist/config/types/src/util/isExpired.d.ts +0 -5
  62. package/dist/config/types/src/util/isExpired.test.d.ts +0 -1
  63. package/dist/config/types/src/util/isIngestHost.d.ts +0 -4
  64. package/dist/config/types/src/util/isInternal.d.ts +0 -5
  65. package/dist/config/types/src/util/isSampled.d.ts +0 -7
  66. package/dist/config/types/src/util/isSampled.test.d.ts +0 -1
  67. package/dist/config/types/src/util/isSessionExpired.d.ts +0 -5
  68. package/dist/config/types/src/util/isSessionExpired.test.d.ts +0 -1
  69. package/dist/config/types/src/util/logger.d.ts +0 -12
  70. package/dist/config/types/src/util/supportsSendBeacon.d.ts +0 -4
  71. package/dist/config/types/test/fixtures/performanceEntry/lcp.d.ts +0 -1
  72. package/dist/config/types/test/fixtures/performanceEntry/navigation.d.ts +0 -1
  73. package/dist/config/types/test/fixtures/performanceEntry/resource.d.ts +0 -1
  74. package/dist/config/types/test/index.d.ts +0 -3
  75. package/dist/config/types/test/mocks/mockRrweb.d.ts +0 -15
  76. package/dist/config/types/test/mocks/mockSdk.d.ts +0 -10
@@ -1,289 +0,0 @@
1
- import { Breadcrumb, Event, Integration } from '@sentry/types';
2
- import { Session } from './session/Session';
3
- import { ReplayPerformanceEntry } from './createPerformanceEntry';
4
- import { IEventBuffer } from './eventBuffer';
5
- import type { AllPerformanceEntry, InitialState, InstrumentationTypeBreadcrumb, InstrumentationTypeSpan, RecordedEvents, RecordingEvent, RecordingOptions, ReplayConfiguration, ReplayPluginOptions, SendReplayRequest } from './types';
6
- /**
7
- * Returns true to return control to calling function, otherwise continue with normal batching
8
- */
9
- declare type AddUpdateCallback = () => boolean | void;
10
- export declare class Replay implements Integration {
11
- /**
12
- * @inheritDoc
13
- */
14
- static id: string;
15
- /**
16
- * @inheritDoc
17
- */
18
- name: string;
19
- eventBuffer: IEventBuffer | null;
20
- /**
21
- * List of PerformanceEntry from PerformanceObserver
22
- */
23
- performanceEvents: AllPerformanceEntry[];
24
- /**
25
- * Options to pass to `rrweb.record()`
26
- */
27
- readonly recordingOptions: RecordingOptions;
28
- readonly options: ReplayPluginOptions;
29
- private performanceObserver;
30
- private retryCount;
31
- private retryInterval;
32
- private debouncedFlush;
33
- private flushLock;
34
- /**
35
- * Timestamp of the last user activity. This lives across sessions.
36
- */
37
- private lastActivity;
38
- /**
39
- * Is the integration currently active?
40
- */
41
- private isEnabled;
42
- /**
43
- *
44
- * Paused is a state where:
45
- * - DOM Recording is not listening at all
46
- * - Nothing will be added to event buffer (e.g. core SDK events)
47
- */
48
- private isPaused;
49
- /**
50
- * Have we attached listeners to the core SDK?
51
- * Note we have to track this as there is no way to remove instrumentation handlers.
52
- */
53
- private hasInitializedCoreListeners;
54
- /**
55
- * Function to stop recording
56
- */
57
- private stopRecording;
58
- /**
59
- * Captured state when integration is first initialized
60
- */
61
- private initialState;
62
- private context;
63
- session: Session | undefined;
64
- constructor({ flushMinDelay, flushMaxDelay, initialFlushDelay, stickySession, useCompression, captureOnlyOnError, replaysSamplingRate, maskAllText, maskAllInputs, blockAllMedia, blockClass, ignoreClass, maskTextClass, blockSelector, ...recordingOptions }?: ReplayConfiguration);
65
- /**
66
- * Because we create a transaction in `setupOnce`, we can potentially create a
67
- * transaction before some native SDK integrations have run and applied their
68
- * own global event processor. An example is:
69
- * https://github.com/getsentry/sentry-javascript/blob/b47ceafbdac7f8b99093ce6023726ad4687edc48/packages/browser/src/integrations/useragent.ts
70
- *
71
- * So we call `this.setup` in next event loop as a workaround to wait for
72
- * other global event processors to finish
73
- */
74
- setupOnce(): void;
75
- /**
76
- * Initializes the plugin.
77
- *
78
- * Creates or loads a session, attaches listeners to varying events (DOM, PerformanceObserver, Recording, Sentry SDK, etc)
79
- */
80
- start(): void;
81
- /**
82
- * Start recording.
83
- *
84
- * Note that this will cause a new DOM checkout
85
- */
86
- startRecording(): void;
87
- /**
88
- * Currently, this needs to be manually called (e.g. for tests). Sentry SDK does not support a teardown
89
- */
90
- stop(): void;
91
- /**
92
- * Pause some replay functionality. See comments for `isPaused`.
93
- * This differs from stop as this only stops DOM recording, it is
94
- * not as thorough of a shutdown as `stop()`. */
95
- pause(): void;
96
- /**
97
- * Resumes recording, see notes for `pause().
98
- *
99
- * Note that calling `startRecording()` here will cause a
100
- * new DOM checkout.`
101
- */
102
- resume(): void;
103
- clearSession(): void;
104
- /**
105
- * Loads a session from storage, or creates a new one if it does not exist or
106
- * is expired.
107
- */
108
- loadSession({ expiry }: {
109
- expiry: number;
110
- }): void;
111
- /**
112
- * Capture some initial state that can change throughout the lifespan of the
113
- * replay. This is required because otherwise they would be captured at the
114
- * first flush.
115
- */
116
- setInitialState(): void;
117
- /**
118
- * Adds listeners to record events for the replay
119
- */
120
- addListeners(): void;
121
- /**
122
- * Cleans up listeners that were created in `addListeners`
123
- */
124
- removeListeners(): void;
125
- /**
126
- * We want to batch uploads of replay events. Save events only if
127
- * `<flushMinDelay>` milliseconds have elapsed since the last event
128
- * *OR* if `<flushMaxDelay>` milliseconds have elapsed.
129
- *
130
- * Accepts a callback to perform side-effects and returns true to stop batch
131
- * processing and hand back control to caller.
132
- */
133
- addUpdate(cb?: AddUpdateCallback): void;
134
- /**
135
- * Core Sentry SDK global event handler. Attaches `replayId` to all [non-replay]
136
- * events as a tag. Also handles the case where we only want to capture a reply
137
- * when an error occurs.
138
- **/
139
- handleGlobalEvent: (event: Event) => Event;
140
- /**
141
- * Handler for recording events.
142
- *
143
- * Adds to event buffer, and has varying flushing behaviors if the event was a checkout.
144
- */
145
- handleRecordingEmit: (event: RecordingEvent, isCheckout?: boolean) => void;
146
- /**
147
- * Handle when visibility of the page content changes. Opening a new tab will
148
- * cause the state to change to hidden because of content of current page will
149
- * be hidden. Likewise, moving a different window to cover the contents of the
150
- * page will also trigger a change to a hidden state.
151
- */
152
- handleVisibilityChange: () => void;
153
- /**
154
- * Handle when page is blurred
155
- */
156
- handleWindowBlur: () => void;
157
- /**
158
- * Handle when page is focused
159
- */
160
- handleWindowFocus: () => void;
161
- /**
162
- * Handler for Sentry Core SDK events.
163
- *
164
- * These specific events will create span-like objects in the recording.
165
- *
166
- */
167
- handleCoreSpanListener: (type: InstrumentationTypeSpan) => (handlerData: any) => void;
168
- /**
169
- * Handler for Sentry Core SDK events.
170
- *
171
- * These events will create breadcrumb-like objects in the recording.
172
- */
173
- handleCoreBreadcrumbListener: (type: InstrumentationTypeBreadcrumb) => (handlerData: any) => void;
174
- /**
175
- * Keep a list of performance entries that will be sent with a replay
176
- */
177
- handlePerformanceObserver: (list: PerformanceObserverEntryList) => void;
178
- /**
179
- * Tasks to run when we consider a page to be hidden (via blurring and/or visibility)
180
- */
181
- doChangeToBackgroundTasks(breadcrumb?: Breadcrumb): void;
182
- /**
183
- * Tasks to run when we consider a page to be visible (via focus and/or visibility)
184
- */
185
- doChangeToForegroundTasks(breadcrumb?: Breadcrumb): void;
186
- /**
187
- * Trigger rrweb to take a full snapshot which will cause this plugin to
188
- * create a new Replay event.
189
- */
190
- triggerFullSnapshot(): void;
191
- /**
192
- * Add an event to the event buffer
193
- */
194
- addEvent(event: RecordingEvent, isCheckout?: boolean): void;
195
- /**
196
- * Update user activity (across session lifespans)
197
- */
198
- updateUserActivity(lastActivity?: number): void;
199
- /**
200
- * Updates the session's last activity timestamp
201
- */
202
- updateSessionActivity(lastActivity?: number): void;
203
- /**
204
- * Updates the user activity timestamp and resumes recording. This should be called in an event handler for a user action that we consider as the user being "active" (e.g. a mouse click).
205
- *
206
- */
207
- triggerUserActivity(): Promise<void>;
208
- /**
209
- * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb
210
- */
211
- createCustomBreadcrumb(breadcrumb: Breadcrumb): void;
212
- /**
213
- * Create a "span" for each performance entry. The parent transaction is `this.replayEvent`.
214
- */
215
- createPerformanceSpans(entries: ReplayPerformanceEntry[]): Promise<void[]>;
216
- /**
217
- * Observed performance events are added to `this.performanceEvents`. These
218
- * are included in the replay event before it is finished and sent to Sentry.
219
- */
220
- addPerformanceEntries(): Promise<void[]>;
221
- /**
222
- * Create a "span" for the total amount of memory being used by JS objects
223
- * (including v8 internal objects).
224
- */
225
- addMemoryEntry(): Promise<void[]> | undefined;
226
- /**
227
- * Checks if recording should be stopped due to user inactivity. Otherwise
228
- * check if session is expired and create a new session if so. Triggers a new
229
- * full snapshot on new session.
230
- *
231
- * Returns true if session is not expired, false otherwise.
232
- */
233
- checkAndHandleExpiredSession({ expiry, }?: {
234
- expiry?: number;
235
- }): boolean | undefined;
236
- /**
237
- * Only flush if `captureOnlyOnError` is false.
238
- */
239
- conditionalFlush(): void;
240
- /**
241
- * Clear context
242
- */
243
- clearContext(): void;
244
- /**
245
- * Return and clear context
246
- */
247
- popEventContext(): {
248
- initialState: InitialState;
249
- errorIds: string[];
250
- traceIds: string[];
251
- urls: string[];
252
- };
253
- /**
254
- * Flushes replay event buffer to Sentry.
255
- *
256
- * Performance events are only added right before flushing - this is
257
- * due to the buffered performance observer events.
258
- *
259
- * Should never be called directly, only by `flush`
260
- */
261
- runFlush(): Promise<void>;
262
- /**
263
- * Flush recording data to Sentry. Creates a lock so that only a single flush
264
- * can be active at a time. Do not call this directly.
265
- */
266
- flush: () => Promise<void>;
267
- /**
268
- *
269
- * Always flush via `debouncedFlush` so that we do not have flushes triggered
270
- * from calling both `flush` and `debouncedFlush`. Otherwise, there could be
271
- * cases of mulitple flushes happening closely together.
272
- */
273
- flushImmediate(): void;
274
- /**
275
- * Send replay attachment using `fetch()`
276
- */
277
- sendReplayRequest({ endpoint, events, replayId: event_id, segmentId: segment_id, includeReplayStartTimestamp, }: SendReplayRequest): Promise<void>;
278
- resetRetries(): void;
279
- /**
280
- * Finalize and send the current replay event to Sentry
281
- */
282
- sendReplay({ replayId, events, segmentId, includeReplayStartTimestamp, }: {
283
- replayId: string;
284
- events: RecordedEvents;
285
- segmentId: number;
286
- includeReplayStartTimestamp: boolean;
287
- }): Promise<unknown>;
288
- }
289
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,63 +0,0 @@
1
- interface SessionObject {
2
- id: string;
3
- /**
4
- * Start time of current session
5
- */
6
- started: number;
7
- /**
8
- * Last known activity of the session
9
- */
10
- lastActivity: number;
11
- /**
12
- * Segment ID for replay events
13
- */
14
- segmentId: number;
15
- /**
16
- * Is the session sampled?
17
- */
18
- sampled: boolean;
19
- }
20
- interface SessionOptions {
21
- stickySession?: boolean;
22
- samplingRate?: number;
23
- }
24
- export declare class Session {
25
- /**
26
- * Session ID
27
- */
28
- private _id;
29
- /**
30
- * Start time of current session
31
- */
32
- private _started;
33
- /**
34
- * Last known activity of the session
35
- */
36
- private _lastActivity;
37
- /**
38
- * Sequence ID specific to replay updates
39
- */
40
- private _segmentId;
41
- /**
42
- * Previous session ID
43
- */
44
- private _previousSessionId;
45
- /**
46
- * Is the Session sampled?
47
- */
48
- private _sampled;
49
- readonly options: Required<Pick<SessionOptions, 'stickySession'>>;
50
- constructor(session?: Partial<SessionObject>, { stickySession, samplingRate }?: SessionOptions);
51
- get id(): string;
52
- get started(): number;
53
- get lastActivity(): number;
54
- set lastActivity(newDate: number);
55
- get segmentId(): number;
56
- set segmentId(id: number);
57
- get previousSessionId(): string | undefined;
58
- set previousSessionId(id: string | undefined);
59
- get sampled(): boolean;
60
- set sampled(_isSampled: boolean);
61
- toJSON(): SessionObject;
62
- }
63
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,6 +0,0 @@
1
- export declare const REPLAY_SESSION_KEY = "sentryReplaySession";
2
- export declare const REPLAY_EVENT_NAME = "replay_event";
3
- export declare const RECORDING_EVENT_NAME = "replay_recording";
4
- export declare const SESSION_IDLE_DURATION = 300000;
5
- export declare const VISIBILITY_CHANGE_TIMEOUT = 300000;
6
- export declare const MAX_SESSION_LIFE = 1800000;
@@ -1,19 +0,0 @@
1
- import { Session } from './Session';
2
- interface CreateSessionParams {
3
- /**
4
- * Should save to sessionStorage?
5
- */
6
- stickySession: boolean;
7
- /**
8
- * The sampling rate of the Session. See integration configuration comments
9
- * for `replaysSamplingRate`.
10
- */
11
- samplingRate?: number;
12
- }
13
- /**
14
- * Create a new session, which in its current implementation is a Sentry event
15
- * that all replays will be saved to as attachments. Currently, we only expect
16
- * one of these Sentry events per "replay session".
17
- */
18
- export declare function createSession({ stickySession, samplingRate, }: CreateSessionParams): Session;
19
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Deletes a session from storage
3
- */
4
- export declare function deleteSession(): void;
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { Session } from './Session';
2
- /**
3
- * Fetches a session from storage
4
- */
5
- export declare function fetchSession(): Session | null;
@@ -1 +0,0 @@
1
- export {};
@@ -1,28 +0,0 @@
1
- import { Session } from './Session';
2
- interface GetSessionParams {
3
- /**
4
- * The length of time (in ms) which we will consider the session to be expired.
5
- */
6
- expiry: number;
7
- /**
8
- * Should save session to sessionStorage?
9
- */
10
- stickySession: boolean;
11
- /**
12
- * The current session (e.g. if stickySession is off)
13
- */
14
- currentSession?: Session;
15
- /**
16
- * The sampling rate of the Session. See integration configuration comments
17
- * for `replaysSamplingRate`.
18
- */
19
- samplingRate?: number;
20
- }
21
- /**
22
- * Get or create a session
23
- */
24
- export declare function getSession({ expiry, currentSession, stickySession, samplingRate, }: GetSessionParams): {
25
- type: string;
26
- session: Session;
27
- };
28
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export * from './createSession';
@@ -1,2 +0,0 @@
1
- import { Session } from './Session';
2
- export declare function saveSession(session: Session): void;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,105 +0,0 @@
1
- import type { eventWithTime, recordOptions } from 'rrweb/typings/types';
2
- export declare type RecordingEvent = eventWithTime;
3
- export declare type RecordingOptions = recordOptions<eventWithTime>;
4
- export declare type RecordedEvents = Uint8Array | string;
5
- export declare type AllPerformanceEntry = PerformancePaintTiming | PerformanceResourceTiming | PerformanceNavigationTiming;
6
- export interface SendReplayRequest {
7
- endpoint: string;
8
- events: RecordedEvents;
9
- replayId: string;
10
- segmentId: number;
11
- includeReplayStartTimestamp: boolean;
12
- }
13
- export declare type InstrumentationTypeBreadcrumb = 'dom' | 'scope';
14
- export declare type InstrumentationTypeSpan = 'fetch' | 'xhr' | 'history';
15
- export declare type InstrumentationType = InstrumentationTypeBreadcrumb | InstrumentationTypeSpan | 'console' | 'error' | 'unhandledrejection';
16
- /**
17
- * The request payload to worker
18
- */
19
- export interface WorkerRequest {
20
- id: number;
21
- method: string;
22
- args: any[];
23
- }
24
- declare global {
25
- const __SENTRY_REPLAY_VERSION__: string;
26
- }
27
- /**
28
- * The response from the worker
29
- */
30
- export interface WorkerResponse {
31
- id: number;
32
- method: string;
33
- success: boolean;
34
- response: string | Uint8Array;
35
- }
36
- export interface ReplayPluginOptions {
37
- /**
38
- * The amount of time to wait before sending a replay
39
- */
40
- flushMinDelay?: number;
41
- /**
42
- * The max amount of time to wait before sending a replay
43
- */
44
- flushMaxDelay?: number;
45
- /**
46
- * The amount of time to buffer the initial snapshot
47
- */
48
- initialFlushDelay?: number;
49
- /**
50
- * If false, will create a new session per pageload
51
- */
52
- stickySession?: boolean;
53
- /**
54
- * Attempt to use compression when web workers are available
55
- *
56
- * (default is true)
57
- */
58
- useCompression?: boolean;
59
- /**
60
- * Only capture replays when an error happens
61
- */
62
- captureOnlyOnError?: boolean;
63
- /**
64
- * The sampling rate for replays. 1.0 will record all replays, 0 will record none.
65
- */
66
- replaysSamplingRate?: number;
67
- /**
68
- * Mask all text in recordings. All text will be replaced with asterisks by default.
69
- */
70
- maskAllText?: boolean;
71
- /**
72
- * Block all media (e.g. images, svg, video) in recordings.
73
- */
74
- blockAllMedia?: boolean;
75
- }
76
- export interface ReplayConfiguration extends ReplayPluginOptions, RecordingOptions {
77
- }
78
- /**
79
- * Some initial state captured before creating a root replay event
80
- */
81
- export interface InitialState {
82
- timestamp: number;
83
- url: string;
84
- }
85
- /**
86
- * Additional context that will be sent w/ `replay_event`
87
- */
88
- export interface ReplayEventContext {
89
- /**
90
- * Set of Sentry error ids that have occurred during a replay segment
91
- */
92
- errorIds: Set<string>;
93
- /**
94
- * Set of Sentry trace ids that have occurred during a replay segment
95
- */
96
- traceIds: Set<string>;
97
- /**
98
- * Ordered list of URLs that have been visited during a replay segment
99
- */
100
- urls: string[];
101
- /**
102
- * The timestamp of the earliest event that has been added to event buffer. This can happen due to the Performance Observer which buffers events.
103
- */
104
- earliestEvent: number | null;
105
- }
@@ -1,5 +0,0 @@
1
- import { addBreadcrumb } from '@sentry/core';
2
- /**
3
- * Wrapper for core SDK's `addBreadcrumb` only when used on `sentry.io`
4
- */
5
- export declare function addInternalBreadcrumb(arg: Parameters<typeof addBreadcrumb>[0]): void;
@@ -1,4 +0,0 @@
1
- /**
2
- * Captures exceptions to Sentry only when it occurs on sentry.io
3
- */
4
- export declare function captureInternalException(err: Error): void;
@@ -1,4 +0,0 @@
1
- import type { Breadcrumb } from '@sentry/types';
2
- declare type RequiredProperties = 'category' | 'message';
3
- export declare function createBreadcrumb(breadcrumb: Pick<Breadcrumb, RequiredProperties> & Partial<Omit<Breadcrumb, RequiredProperties>>): Breadcrumb;
4
- export {};
@@ -1,5 +0,0 @@
1
- import { RecordedEvents } from '../types';
2
- export declare function createPayload({ events, headers, }: {
3
- events: RecordedEvents;
4
- headers: Record<string, any>;
5
- }): string | Uint8Array;
@@ -1,10 +0,0 @@
1
- /**
2
- * There are some difficulties diagnosing why there are duplicate navigation
3
- * entries. We've witnessed several intermittent results:
4
- * - duplicate entries have duration = 0
5
- * - duplicate entries are the same object reference
6
- * - none of the above
7
- *
8
- * Compare the values of several keys to determine if the entries are duplicates or not.
9
- */
10
- export declare function dedupePerformanceEntries(currentList: PerformanceEntryList, newList: PerformanceEntryList): PerformancePaintTiming[];
@@ -1,5 +0,0 @@
1
- /**
2
- * Given an initial timestamp and an expiry duration, checks to see if current
3
- * time should be considered as expired.
4
- */
5
- export declare function isExpired(initialTime: null | number, expiry: undefined | number, targetTime?: number): boolean;
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- /**
2
- * Checks is `targetHost` is a Sentry ingestion host
3
- */
4
- export declare function isIngestHost(targetHost: string): boolean;
@@ -1,5 +0,0 @@
1
- /**
2
- * Returns true if we are currently recording an internal to Sentry replay
3
- * (e.g. on https://sentry.io )
4
- */
5
- export declare function isInternal(): boolean;
@@ -1,7 +0,0 @@
1
- /**
2
- * Given a sample rate, returns true if replay should be sampled.
3
- *
4
- * 1.0 = 100% sampling
5
- * 0.0 = 0% sampling
6
- */
7
- export declare function isSampled(sampleRate: number): boolean;
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { Session } from '../session/Session';
2
- /**
3
- * Checks to see if session is expired
4
- */
5
- export declare function isSessionExpired(session: Session, idleTimeout: number, targetTime?: number): boolean;
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- declare const logger: {
2
- error: (...args: any[]) => any;
3
- warn: (...args: any[]) => any;
4
- log: (...args: any[]) => any;
5
- disable(): void;
6
- enable(): void;
7
- info: (...args: unknown[]) => void;
8
- debug: (...args: unknown[]) => void;
9
- assert: (...args: unknown[]) => void;
10
- trace: (...args: unknown[]) => void;
11
- };
12
- export { logger };
@@ -1,4 +0,0 @@
1
- /**
2
- * Determine if there is browser support for `navigator.sendBeacon`
3
- */
4
- export declare function supportsSendBeacon(): boolean;
@@ -1 +0,0 @@
1
- export declare function PerformanceEntryLcp(obj?: Partial<PerformancePaintTiming>): PerformancePaintTiming;