@sentry/replay 0.6.4 → 0.6.6
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/dist/index.es.js +14 -3
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/dist/config/types/jest.config.d.ts +0 -3
- package/dist/config/types/jest.setup.d.ts +0 -31
- package/dist/config/types/src/blockAllMedia.test.d.ts +0 -1
- package/dist/config/types/src/coreHandlers/getBreadcrumbHandler.d.ts +0 -3
- package/dist/config/types/src/coreHandlers/getSpanHandler.d.ts +0 -5
- package/dist/config/types/src/coreHandlers/handleDom.d.ts +0 -1
- package/dist/config/types/src/coreHandlers/handleFetch.d.ts +0 -19
- package/dist/config/types/src/coreHandlers/handleFetch.test.d.ts +0 -1
- package/dist/config/types/src/coreHandlers/handleHistory.d.ts +0 -7
- package/dist/config/types/src/coreHandlers/handleScope-unit.test.d.ts +0 -1
- package/dist/config/types/src/coreHandlers/handleScope.d.ts +0 -2
- package/dist/config/types/src/coreHandlers/handleScope.test.d.ts +0 -1
- package/dist/config/types/src/coreHandlers/handleXhr.d.ts +0 -21
- package/dist/config/types/src/createPerformanceEntry.d.ts +0 -43
- package/dist/config/types/src/createPerformanceEntry.test.d.ts +0 -1
- package/dist/config/types/src/eventBuffer.d.ts +0 -45
- package/dist/config/types/src/eventBuffer.test.d.ts +0 -1
- package/dist/config/types/src/flags.d.ts +0 -2
- package/dist/config/types/src/flush.test.d.ts +0 -1
- package/dist/config/types/src/index-captureOnlyOnError.test.d.ts +0 -1
- package/dist/config/types/src/index-noSticky.test.d.ts +0 -1
- package/dist/config/types/src/index-sampling.test.d.ts +0 -1
- package/dist/config/types/src/index.d.ts +0 -245
- package/dist/config/types/src/index.test.d.ts +0 -1
- package/dist/config/types/src/multiple-instances.test.d.ts +0 -1
- package/dist/config/types/src/session/Session.d.ts +0 -63
- package/dist/config/types/src/session/Session.test.d.ts +0 -1
- package/dist/config/types/src/session/constants.d.ts +0 -5
- package/dist/config/types/src/session/createSession.d.ts +0 -19
- package/dist/config/types/src/session/createSession.test.d.ts +0 -1
- package/dist/config/types/src/session/deleteSession.d.ts +0 -4
- package/dist/config/types/src/session/deleteSession.test.d.ts +0 -1
- package/dist/config/types/src/session/fetchSession.d.ts +0 -5
- package/dist/config/types/src/session/fetchSession.test.d.ts +0 -1
- package/dist/config/types/src/session/getSession.d.ts +0 -28
- package/dist/config/types/src/session/getSession.test.d.ts +0 -1
- package/dist/config/types/src/session/index.d.ts +0 -1
- package/dist/config/types/src/session/saveSession.d.ts +0 -2
- package/dist/config/types/src/session/saveSession.test.d.ts +0 -1
- package/dist/config/types/src/stop.test.d.ts +0 -1
- package/dist/config/types/src/types.d.ts +0 -105
- package/dist/config/types/src/util/addInternalBreadcrumb.d.ts +0 -5
- package/dist/config/types/src/util/captureInternalException.d.ts +0 -4
- package/dist/config/types/src/util/createBreadcrumb.d.ts +0 -4
- package/dist/config/types/src/util/createPayload.d.ts +0 -5
- package/dist/config/types/src/util/dedupePerformanceEntries.d.ts +0 -10
- package/dist/config/types/src/util/dedupePerformanceEntries.test.d.ts +0 -1
- package/dist/config/types/src/util/isExpired.d.ts +0 -5
- package/dist/config/types/src/util/isExpired.test.d.ts +0 -1
- package/dist/config/types/src/util/isIngestHost.d.ts +0 -4
- package/dist/config/types/src/util/isInternal.d.ts +0 -5
- package/dist/config/types/src/util/isSampled.d.ts +0 -7
- package/dist/config/types/src/util/isSampled.test.d.ts +0 -1
- package/dist/config/types/src/util/isSessionExpired.d.ts +0 -5
- package/dist/config/types/src/util/isSessionExpired.test.d.ts +0 -1
- package/dist/config/types/src/util/logger.d.ts +0 -12
- package/dist/config/types/test/fixtures/performanceEntry/lcp.d.ts +0 -1
- package/dist/config/types/test/fixtures/performanceEntry/navigation.d.ts +0 -1
- package/dist/config/types/test/fixtures/performanceEntry/resource.d.ts +0 -1
- package/dist/config/types/test/index.d.ts +0 -3
- package/dist/config/types/test/mocks/mockRrweb.d.ts +0 -14
- package/dist/config/types/test/mocks/mockSdk.d.ts +0 -10
|
@@ -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 +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,4 +0,0 @@
|
|
|
1
|
-
import type { Breadcrumb } from '@sentry/types';
|
|
2
|
-
declare type RequiredProperties = 'category' | 'message';
|
|
3
|
-
export default function createBreadcrumb(breadcrumb: Pick<Breadcrumb, RequiredProperties> & Partial<Omit<Breadcrumb, RequiredProperties>>): Breadcrumb;
|
|
4
|
-
export {};
|
|
@@ -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 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -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
|
-
debug: (...args: unknown[]) => void;
|
|
8
|
-
info: (...args: unknown[]) => void;
|
|
9
|
-
assert: (...args: unknown[]) => void;
|
|
10
|
-
trace: (...args: unknown[]) => void;
|
|
11
|
-
};
|
|
12
|
-
export { logger };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function PerformanceEntryLcp(obj?: Partial<PerformancePaintTiming>): PerformancePaintTiming;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function PerformanceEntryNavigation(obj?: Partial<PerformanceNavigationTiming>): PerformanceNavigationTiming;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function PerformanceEntryResource(obj?: Partial<PerformanceResourceTiming>): PerformanceResourceTiming;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RecordingEvent } from '../../src/types';
|
|
2
|
-
declare type RecordAdditionalProperties = {
|
|
3
|
-
takeFullSnapshot: jest.Mock;
|
|
4
|
-
addCustomEvent: () => void;
|
|
5
|
-
freezePage: () => void;
|
|
6
|
-
mirror: unknown;
|
|
7
|
-
_emitter: (event: RecordingEvent, ...args: any[]) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare type RecordMock = jest.MockedFunction<typeof rrweb.record> & RecordAdditionalProperties;
|
|
10
|
-
import * as rrweb from 'rrweb';
|
|
11
|
-
export declare function mockRrweb(): {
|
|
12
|
-
record: any;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BrowserOptions } from '@sentry/browser';
|
|
2
|
-
import { ReplayConfiguration } from '../../src/types';
|
|
3
|
-
interface MockSdkParams {
|
|
4
|
-
replayOptions?: ReplayConfiguration;
|
|
5
|
-
sentryOptions?: BrowserOptions;
|
|
6
|
-
}
|
|
7
|
-
export declare function mockSdk({ replayOptions, sentryOptions, }?: MockSdkParams): Promise<{
|
|
8
|
-
replay: import("../../src").Replay;
|
|
9
|
-
}>;
|
|
10
|
-
export {};
|