@multiplayer-app/session-recorder-react-native 1.0.1-beta.4 → 1.0.1-beta.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/android/build.gradle +1 -1
- package/android/src/main/AndroidManifest.xml +2 -2
- package/android/src/main/java/com/{multiplayer/sessionrecordernative → sessionrecordernative}/SessionRecorderNativeConfig.kt +1 -1
- package/android/src/main/java/com/{multiplayer/sessionrecordernative → sessionrecordernative}/SessionRecorderNativeModule.kt +9 -9
- package/android/src/main/java/com/{multiplayer/sessionrecordernative → sessionrecordernative}/SessionRecorderNativePackage.kt +2 -2
- package/android/src/main/java/com/{multiplayer/sessionrecordernative → sessionrecordernative}/model/TargetInfo.kt +1 -1
- package/android/src/main/java/com/{multiplayer/sessionrecordernative → sessionrecordernative}/util/ViewUtils.kt +2 -2
- package/lib/module/SessionRecorderNativeSpec.js +5 -0
- package/lib/module/SessionRecorderNativeSpec.js.map +1 -0
- package/lib/module/components/SessionRecorderWidget/ErrorBanner.js.map +1 -1
- package/lib/module/components/SessionRecorderWidget/ModalHeader.js.map +1 -1
- package/lib/module/components/SessionRecorderWidget/SessionRecorderWidget.js.map +1 -1
- package/lib/module/components/SessionRecorderWidget/icons.js.map +1 -1
- package/lib/module/components/SessionRecorderWidget/styles.js.map +1 -1
- package/lib/module/config/constants.js.map +1 -1
- package/lib/module/config/defaults.js.map +1 -1
- package/lib/module/config/masking.js.map +1 -1
- package/lib/module/config/session-recorder.js.map +1 -1
- package/lib/module/config/validators.js.map +1 -1
- package/lib/module/config/widget.js.map +1 -1
- package/lib/module/context/SessionRecorderStore.js.map +1 -1
- package/lib/module/context/useSessionRecorderStore.js.map +1 -1
- package/lib/module/context/useStoreSelector.js.map +1 -1
- package/lib/module/native/SessionRecorderNative.js +16 -11
- package/lib/module/native/SessionRecorderNative.js.map +1 -1
- package/lib/module/native/index.js.map +1 -1
- package/lib/module/otel/helpers.js +1 -1
- package/lib/module/otel/helpers.js.map +1 -1
- package/lib/module/otel/index.js.map +1 -1
- package/lib/module/otel/instrumentations/index.js.map +1 -1
- package/lib/module/patch/xhr.js.map +1 -1
- package/lib/module/recorder/eventExporter.js.map +1 -1
- package/lib/module/recorder/gestureRecorder.js.map +1 -1
- package/lib/module/recorder/index.js.map +1 -1
- package/lib/module/recorder/navigationTracker.js.map +1 -1
- package/lib/module/recorder/screenRecorder.js.map +1 -1
- package/lib/module/services/api.service.js.map +1 -1
- package/lib/module/services/network.service.js.map +1 -1
- package/lib/module/services/screenMaskingService.js +1 -1
- package/lib/module/services/screenMaskingService.js.map +1 -1
- package/lib/module/services/storage.service.js.map +1 -1
- package/lib/module/session-recorder.js.map +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/session-recorder.js.map +1 -1
- package/lib/module/utils/app-metadata.js +2 -2
- package/lib/module/utils/constants.optional.js.map +1 -1
- package/lib/module/utils/createStore.js.map +1 -1
- package/lib/module/utils/logger.js +0 -8
- package/lib/module/utils/logger.js.map +1 -1
- package/lib/module/utils/platform.js +1 -1
- package/lib/module/utils/platform.js.map +1 -1
- package/lib/module/utils/rrweb-events.js.map +1 -1
- package/lib/module/utils/session.js.map +1 -1
- package/lib/module/utils/shallowEqual.js.map +1 -1
- package/lib/module/utils/time.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts +42 -0
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts.map +1 -0
- package/lib/typescript/src/components/ScreenRecorderView/index.d.ts +1 -1
- package/lib/typescript/src/components/SessionRecorderWidget/ErrorBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/SessionRecorderWidget/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/SessionRecorderWidget/SessionRecorderWidget.d.ts.map +1 -1
- package/lib/typescript/src/components/SessionRecorderWidget/icons.d.ts.map +1 -1
- package/lib/typescript/src/components/SessionRecorderWidget/index.d.ts +1 -1
- package/lib/typescript/src/components/SessionRecorderWidget/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/config/constants.d.ts.map +1 -1
- package/lib/typescript/src/config/defaults.d.ts.map +1 -1
- package/lib/typescript/src/config/index.d.ts.map +1 -1
- package/lib/typescript/src/config/masking.d.ts.map +1 -1
- package/lib/typescript/src/config/session-recorder.d.ts.map +1 -1
- package/lib/typescript/src/config/validators.d.ts.map +1 -1
- package/lib/typescript/src/config/widget.d.ts +1 -1
- package/lib/typescript/src/config/widget.d.ts.map +1 -1
- package/lib/typescript/src/context/SessionRecorderStore.d.ts.map +1 -1
- package/lib/typescript/src/context/useSessionRecorderStore.d.ts +3 -3
- package/lib/typescript/src/context/useSessionRecorderStore.d.ts.map +1 -1
- package/lib/typescript/src/context/useStoreSelector.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/SessionRecorderNative.d.ts +3 -54
- package/lib/typescript/src/native/SessionRecorderNative.d.ts.map +1 -1
- package/lib/typescript/src/native/index.d.ts +1 -1
- package/lib/typescript/src/native/index.d.ts.map +1 -1
- package/lib/typescript/src/otel/helpers.d.ts.map +1 -1
- package/lib/typescript/src/otel/index.d.ts.map +1 -1
- package/lib/typescript/src/otel/instrumentations/index.d.ts.map +1 -1
- package/lib/typescript/src/patch/index.d.ts.map +1 -1
- package/lib/typescript/src/patch/xhr.d.ts.map +1 -1
- package/lib/typescript/src/recorder/eventExporter.d.ts.map +1 -1
- package/lib/typescript/src/recorder/gestureRecorder.d.ts.map +1 -1
- package/lib/typescript/src/recorder/index.d.ts.map +1 -1
- package/lib/typescript/src/recorder/navigationTracker.d.ts.map +1 -1
- package/lib/typescript/src/recorder/screenRecorder.d.ts.map +1 -1
- package/lib/typescript/src/services/api.service.d.ts.map +1 -1
- package/lib/typescript/src/services/network.service.d.ts.map +1 -1
- package/lib/typescript/src/services/screenMaskingService.d.ts +1 -1
- package/lib/typescript/src/services/screenMaskingService.d.ts.map +1 -1
- package/lib/typescript/src/services/storage.service.d.ts.map +1 -1
- package/lib/typescript/src/session-recorder.d.ts.map +1 -1
- package/lib/typescript/src/types/configs.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/types/session-recorder.d.ts +4 -4
- package/lib/typescript/src/types/session-recorder.d.ts.map +1 -1
- package/lib/typescript/src/types/session.d.ts.map +1 -1
- package/lib/typescript/src/utils/app-metadata.d.ts.map +1 -1
- package/lib/typescript/src/utils/constants.optional.d.ts.map +1 -1
- package/lib/typescript/src/utils/constants.optional.expo.d.ts.map +1 -1
- package/lib/typescript/src/utils/createStore.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/logger.d.ts +1 -1
- package/lib/typescript/src/utils/logger.d.ts.map +1 -1
- package/lib/typescript/src/utils/platform.d.ts.map +1 -1
- package/lib/typescript/src/utils/request-utils.d.ts.map +1 -1
- package/lib/typescript/src/utils/rrweb-events.d.ts.map +1 -1
- package/lib/typescript/src/utils/session.d.ts.map +1 -1
- package/lib/typescript/src/utils/shallowEqual.d.ts.map +1 -1
- package/lib/typescript/src/utils/time.d.ts.map +1 -1
- package/lib/typescript/src/utils/type-utils.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/SessionRecorderNativeSpec.ts +53 -0
- package/src/components/ScreenRecorderView/index.ts +1 -1
- package/src/components/SessionRecorderWidget/ErrorBanner.tsx +14 -14
- package/src/components/SessionRecorderWidget/ModalHeader.tsx +11 -9
- package/src/components/SessionRecorderWidget/SessionRecorderWidget.tsx +70 -56
- package/src/components/SessionRecorderWidget/icons.tsx +58 -30
- package/src/components/SessionRecorderWidget/index.ts +1 -1
- package/src/components/SessionRecorderWidget/styles.ts +17 -18
- package/src/components/index.ts +2 -2
- package/src/config/constants.ts +19 -20
- package/src/config/defaults.ts +35 -31
- package/src/config/index.ts +5 -5
- package/src/config/masking.ts +44 -18
- package/src/config/session-recorder.ts +54 -26
- package/src/config/validators.ts +43 -20
- package/src/config/widget.ts +24 -15
- package/src/context/SessionRecorderStore.ts +19 -18
- package/src/context/useSessionRecorderStore.ts +17 -10
- package/src/context/useStoreSelector.ts +20 -18
- package/src/index.ts +7 -7
- package/src/native/SessionRecorderNative.ts +68 -112
- package/src/native/index.ts +5 -1
- package/src/otel/helpers.ts +109 -93
- package/src/otel/index.ts +46 -49
- package/src/otel/instrumentations/index.ts +44 -41
- package/src/patch/index.ts +1 -1
- package/src/patch/xhr.ts +77 -78
- package/src/recorder/eventExporter.ts +63 -68
- package/src/recorder/gestureRecorder.ts +359 -212
- package/src/recorder/index.ts +75 -62
- package/src/recorder/navigationTracker.ts +120 -97
- package/src/recorder/screenRecorder.ts +214 -163
- package/src/services/api.service.ts +49 -48
- package/src/services/network.service.ts +67 -58
- package/src/services/screenMaskingService.ts +81 -50
- package/src/services/storage.service.ts +99 -70
- package/src/session-recorder.ts +270 -214
- package/src/types/configs.ts +53 -31
- package/src/types/expo-constants.d.ts +2 -2
- package/src/types/index.ts +16 -18
- package/src/types/session-recorder.ts +106 -111
- package/src/types/session.ts +45 -45
- package/src/utils/app-metadata.ts +9 -9
- package/src/utils/constants.optional.expo.ts +3 -3
- package/src/utils/constants.optional.ts +14 -12
- package/src/utils/createStore.ts +23 -20
- package/src/utils/index.ts +7 -7
- package/src/utils/logger.ts +87 -58
- package/src/utils/platform.ts +149 -118
- package/src/utils/request-utils.ts +15 -15
- package/src/utils/rrweb-events.ts +47 -34
- package/src/utils/session.ts +15 -12
- package/src/utils/shallowEqual.ts +16 -10
- package/src/utils/time.ts +7 -4
- package/src/utils/type-utils.ts +36 -36
- package/src/version.ts +1 -1
- package/android/src/main/java/com/multiplayer/sessionrecordernative/SessionRecorderNativeModuleSpec.kt +0 -51
- package/android/src/main/java/com/xxx/XxxModule.kt +0 -23
- package/ios/Xxx.h +0 -5
- package/ios/Xxx.mm +0 -21
package/src/types/configs.ts
CHANGED
|
@@ -1,24 +1,29 @@
|
|
|
1
1
|
import { type PropagateTraceHeaderCorsUrls } from '@opentelemetry/instrumentation-xml-http-request/build/src/types';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
type MaskingOptions,
|
|
4
|
+
type SessionRecorderOptions,
|
|
5
|
+
} from './session-recorder';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Utility type that makes all properties required recursively
|
|
7
9
|
* Removes optional modifiers and undefined types from nested objects
|
|
8
10
|
*/
|
|
9
|
-
export type DeepRequired<T> =
|
|
10
|
-
|
|
11
|
-
T extends ReadonlyArray<infer U>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
export type DeepRequired<T> = T extends Function
|
|
12
|
+
? T
|
|
13
|
+
: T extends ReadonlyArray<infer U>
|
|
14
|
+
? Array<DeepRequired<NonNullable<U>>>
|
|
15
|
+
: T extends Array<infer U>
|
|
16
|
+
? Array<DeepRequired<NonNullable<U>>>
|
|
17
|
+
: T extends object
|
|
18
|
+
? { -readonly [K in keyof T]-?: DeepRequired<NonNullable<T[K]>> }
|
|
19
|
+
: NonNullable<T>;
|
|
15
20
|
|
|
16
21
|
/**
|
|
17
22
|
* Fully resolved configuration interface
|
|
18
23
|
* All optional properties from SessionRecorderOptions are now required
|
|
19
24
|
*/
|
|
20
|
-
export interface SessionRecorderConfigs
|
|
21
|
-
|
|
25
|
+
export interface SessionRecorderConfigs
|
|
26
|
+
extends DeepRequired<SessionRecorderOptions> {}
|
|
22
27
|
|
|
23
28
|
/**
|
|
24
29
|
* Base configuration interface with common properties
|
|
@@ -26,18 +31,27 @@ export interface SessionRecorderConfigs extends DeepRequired<SessionRecorderOpti
|
|
|
26
31
|
*/
|
|
27
32
|
export interface BaseConfig {
|
|
28
33
|
/** API key for authentication */
|
|
29
|
-
apiKey: string
|
|
34
|
+
apiKey: string;
|
|
30
35
|
/** Base URL for the API calls */
|
|
31
|
-
apiBaseUrl: string
|
|
36
|
+
apiBaseUrl: string;
|
|
32
37
|
/** OTLP collector endpoint for traces */
|
|
33
|
-
exporterEndpoint: string
|
|
38
|
+
exporterEndpoint: string;
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
/**
|
|
37
42
|
* Type for masking configuration used by the Tracer
|
|
38
43
|
* Contains only trace-related masking options
|
|
39
44
|
*/
|
|
40
|
-
export type TracerReactNativeMasking = Pick<
|
|
45
|
+
export type TracerReactNativeMasking = Pick<
|
|
46
|
+
MaskingOptions,
|
|
47
|
+
| 'isContentMaskingEnabled'
|
|
48
|
+
| 'maskBody'
|
|
49
|
+
| 'maskHeaders'
|
|
50
|
+
| 'maskBodyFieldsList'
|
|
51
|
+
| 'maskHeadersList'
|
|
52
|
+
| 'headersToInclude'
|
|
53
|
+
| 'headersToExclude'
|
|
54
|
+
>;
|
|
41
55
|
|
|
42
56
|
/**
|
|
43
57
|
* Configuration interface for the Tracer class
|
|
@@ -45,34 +59,42 @@ export type TracerReactNativeMasking = Pick<MaskingOptions, 'isContentMaskingEna
|
|
|
45
59
|
*/
|
|
46
60
|
export interface TracerReactNativeConfig extends BaseConfig {
|
|
47
61
|
/** Application name */
|
|
48
|
-
application: string
|
|
62
|
+
application: string;
|
|
49
63
|
/** Application version */
|
|
50
|
-
version: string
|
|
64
|
+
version: string;
|
|
51
65
|
/** Environment (e.g., 'production', 'staging') */
|
|
52
|
-
environment: string
|
|
66
|
+
environment: string;
|
|
53
67
|
/** URLs to ignore during tracing */
|
|
54
|
-
ignoreUrls: Array<string | RegExp
|
|
68
|
+
ignoreUrls: Array<string | RegExp>;
|
|
55
69
|
/** Trace ID ratio for sampling */
|
|
56
|
-
sampleTraceRatio: number
|
|
70
|
+
sampleTraceRatio: number;
|
|
57
71
|
/** URLs for CORS trace header propagation */
|
|
58
|
-
propagateTraceHeaderCorsUrls: PropagateTraceHeaderCorsUrls
|
|
72
|
+
propagateTraceHeaderCorsUrls: PropagateTraceHeaderCorsUrls;
|
|
59
73
|
/** Whether to schematize document span payload */
|
|
60
|
-
schemifyDocSpanPayload: boolean
|
|
74
|
+
schemifyDocSpanPayload: boolean;
|
|
61
75
|
/** Maximum size for capturing HTTP payload */
|
|
62
|
-
maxCapturingHttpPayloadSize: number
|
|
76
|
+
maxCapturingHttpPayloadSize: number;
|
|
63
77
|
/** If true, captures body in traces */
|
|
64
|
-
captureBody: boolean
|
|
78
|
+
captureBody: boolean;
|
|
65
79
|
/** If true, captures headers in traces */
|
|
66
|
-
captureHeaders: boolean
|
|
80
|
+
captureHeaders: boolean;
|
|
67
81
|
/** Configuration for masking sensitive data in session recordings */
|
|
68
|
-
masking: TracerReactNativeMasking
|
|
82
|
+
masking: TracerReactNativeMasking;
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
/**
|
|
72
86
|
* Type for masking configuration used by the Recorder
|
|
73
87
|
* Contains only screen recording masking options
|
|
74
88
|
*/
|
|
75
|
-
export type RecorderMaskingConfig = Pick<
|
|
89
|
+
export type RecorderMaskingConfig = Pick<
|
|
90
|
+
MaskingOptions,
|
|
91
|
+
| 'maskTextInputs'
|
|
92
|
+
| 'maskImages'
|
|
93
|
+
| 'maskButtons'
|
|
94
|
+
| 'maskLabels'
|
|
95
|
+
| 'maskWebViews'
|
|
96
|
+
| 'maskSandboxedViews'
|
|
97
|
+
>;
|
|
76
98
|
|
|
77
99
|
/**
|
|
78
100
|
* Configuration interface for the Recorder class
|
|
@@ -80,17 +102,17 @@ export type RecorderMaskingConfig = Pick<MaskingOptions, 'maskTextInputs' | 'mas
|
|
|
80
102
|
*/
|
|
81
103
|
export interface RecorderConfig extends BaseConfig {
|
|
82
104
|
/** Whether to record gestures */
|
|
83
|
-
recordGestures?: boolean
|
|
105
|
+
recordGestures?: boolean;
|
|
84
106
|
/** Whether to record navigation */
|
|
85
|
-
recordNavigation?: boolean
|
|
107
|
+
recordNavigation?: boolean;
|
|
86
108
|
/** Whether to record screen */
|
|
87
|
-
recordScreen?: boolean
|
|
109
|
+
recordScreen?: boolean;
|
|
88
110
|
/** Configuration for masking sensitive data in screen recordings */
|
|
89
|
-
masking?: RecorderMaskingConfig
|
|
111
|
+
masking?: RecorderMaskingConfig;
|
|
90
112
|
}
|
|
91
113
|
|
|
92
114
|
/**
|
|
93
115
|
* Configuration interface for the ApiService class
|
|
94
116
|
* Contains settings for API communication
|
|
95
117
|
*/
|
|
96
|
-
export interface ApiServiceConfig extends BaseConfig {
|
|
118
|
+
export interface ApiServiceConfig extends BaseConfig {}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
// In non-Expo projects, this module is never required at runtime because we import
|
|
3
3
|
// through an optional shim that resolves to undefined.
|
|
4
4
|
declare module 'expo-constants' {
|
|
5
|
-
const Constants: any
|
|
6
|
-
export default Constants
|
|
5
|
+
const Constants: any;
|
|
6
|
+
export default Constants;
|
|
7
7
|
}
|
package/src/types/index.ts
CHANGED
|
@@ -1,29 +1,27 @@
|
|
|
1
|
-
export * from './session-recorder'
|
|
2
|
-
export * from './session'
|
|
3
|
-
export * from './configs'
|
|
1
|
+
export * from './session-recorder';
|
|
2
|
+
export * from './session';
|
|
3
|
+
export * from './configs';
|
|
4
4
|
|
|
5
5
|
// Import types for use in this file
|
|
6
|
-
import type { eventWithTime } from '@rrweb/types'
|
|
7
|
-
|
|
6
|
+
import type { eventWithTime } from '@rrweb/types';
|
|
8
7
|
|
|
9
8
|
export interface ReactNativeScreenData {
|
|
10
|
-
width: number
|
|
11
|
-
height: number
|
|
12
|
-
base64Image: string
|
|
13
|
-
timestamp: number
|
|
14
|
-
screenName?: string
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
base64Image: string;
|
|
12
|
+
timestamp: number;
|
|
13
|
+
screenName?: string;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
export interface ReactNativeTouchData {
|
|
18
|
-
pageX: number
|
|
19
|
-
pageY: number
|
|
20
|
-
target?: string
|
|
21
|
-
pressure?: number
|
|
22
|
-
timestamp: number
|
|
17
|
+
pageX: number;
|
|
18
|
+
pageY: number;
|
|
19
|
+
target?: string;
|
|
20
|
+
pressure?: number;
|
|
21
|
+
timestamp: number;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
|
|
26
24
|
// Event recording interface
|
|
27
25
|
export interface EventRecorder {
|
|
28
|
-
recordEvent(event: eventWithTime): void
|
|
29
|
-
}
|
|
26
|
+
recordEvent(event: eventWithTime): void;
|
|
27
|
+
}
|
|
@@ -3,7 +3,6 @@ import { SessionType } from '@multiplayer-app/session-recorder-common';
|
|
|
3
3
|
import { type PropagateTraceHeaderCorsUrls } from '@opentelemetry/sdk-trace-web';
|
|
4
4
|
import type { ISession } from './session';
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
// WidgetButtonPlacement moved to configs.ts
|
|
8
7
|
|
|
9
8
|
export enum SessionState {
|
|
@@ -29,7 +28,7 @@ export enum LogLevel {
|
|
|
29
28
|
DEBUG = 0,
|
|
30
29
|
INFO = 1,
|
|
31
30
|
WARN = 2,
|
|
32
|
-
ERROR = 3
|
|
31
|
+
ERROR = 3,
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
/**
|
|
@@ -40,40 +39,40 @@ export interface SessionRecorderOptions {
|
|
|
40
39
|
/**
|
|
41
40
|
* The API key used to authenticate with the session debugger service.
|
|
42
41
|
*/
|
|
43
|
-
apiKey: string
|
|
42
|
+
apiKey: string;
|
|
44
43
|
|
|
45
44
|
/**
|
|
46
45
|
* The version of the application using the session debugger.
|
|
47
46
|
*/
|
|
48
|
-
version: string
|
|
47
|
+
version: string;
|
|
49
48
|
|
|
50
49
|
/**
|
|
51
50
|
* The name of the application being debugged.
|
|
52
51
|
*/
|
|
53
|
-
application: string
|
|
52
|
+
application: string;
|
|
54
53
|
|
|
55
54
|
/**
|
|
56
55
|
* The environment where the application is running (e.g., 'production', 'staging').
|
|
57
56
|
*/
|
|
58
|
-
environment: string
|
|
57
|
+
environment: string;
|
|
59
58
|
|
|
60
59
|
/**
|
|
61
60
|
* (Optional) OTLP collector endpoint.
|
|
62
61
|
*/
|
|
63
|
-
exporterEndpoint?: string
|
|
62
|
+
exporterEndpoint?: string;
|
|
64
63
|
|
|
65
64
|
/**
|
|
66
65
|
* (Optional) Base URL for the API calls.
|
|
67
66
|
* This allows customization of the API endpoint for sending session data.
|
|
68
67
|
*/
|
|
69
|
-
apiBaseUrl?: string
|
|
68
|
+
apiBaseUrl?: string;
|
|
70
69
|
|
|
71
70
|
/**
|
|
72
71
|
* (Optional) An array of URLs or regular expressions that should be ignored by the session debugger.
|
|
73
72
|
* Any URL that partially matches any regex in this array will not be traced.
|
|
74
73
|
* Additionally, URLs that exactly match any string in the array will also be ignored.
|
|
75
74
|
*/
|
|
76
|
-
ignoreUrls?: Array<string | RegExp
|
|
75
|
+
ignoreUrls?: Array<string | RegExp>;
|
|
77
76
|
|
|
78
77
|
/**
|
|
79
78
|
* (Optional) Enables the continuous recording feature and UI.
|
|
@@ -81,7 +80,7 @@ export interface SessionRecorderOptions {
|
|
|
81
80
|
* session are ignored.
|
|
82
81
|
* @default true
|
|
83
82
|
*/
|
|
84
|
-
showContinuousRecording?: boolean
|
|
83
|
+
showContinuousRecording?: boolean;
|
|
85
84
|
|
|
86
85
|
/**
|
|
87
86
|
* Optional widget configuration
|
|
@@ -89,121 +88,120 @@ export interface SessionRecorderOptions {
|
|
|
89
88
|
widget?: {
|
|
90
89
|
/** Enables/disables the widget entirely
|
|
91
90
|
* @default true
|
|
92
|
-
|
|
93
|
-
enabled?: boolean
|
|
91
|
+
*/
|
|
92
|
+
enabled?: boolean;
|
|
94
93
|
/** Floating button config
|
|
95
94
|
* @default visible: true, placement: 'bottom-right'
|
|
96
|
-
|
|
95
|
+
*/
|
|
97
96
|
button?: {
|
|
98
|
-
visible?: boolean
|
|
99
|
-
placement?: WidgetButtonPlacement
|
|
100
|
-
}
|
|
97
|
+
visible?: boolean;
|
|
98
|
+
placement?: WidgetButtonPlacement;
|
|
99
|
+
};
|
|
101
100
|
|
|
102
101
|
/**
|
|
103
102
|
* (Optional) Configuration for customizable UI text and labels
|
|
104
103
|
* @default See PopoverTextConfig defaults
|
|
105
104
|
*/
|
|
106
|
-
textOverrides?: TextOverridesOptions
|
|
107
|
-
}
|
|
105
|
+
textOverrides?: TextOverridesOptions;
|
|
106
|
+
};
|
|
108
107
|
|
|
109
108
|
/**
|
|
110
109
|
* (Optional) Trace ID Ratio for sampling
|
|
111
110
|
* @default 0.15
|
|
112
111
|
*/
|
|
113
|
-
sampleTraceRatio?: number
|
|
112
|
+
sampleTraceRatio?: number;
|
|
114
113
|
|
|
115
114
|
/**
|
|
116
115
|
* (Optional) URLs or regex patterns for CORS trace header propagation
|
|
117
116
|
*/
|
|
118
|
-
propagateTraceHeaderCorsUrls?: PropagateTraceHeaderCorsUrls
|
|
117
|
+
propagateTraceHeaderCorsUrls?: PropagateTraceHeaderCorsUrls;
|
|
119
118
|
|
|
120
119
|
/**
|
|
121
120
|
* (Optional) If true, schematizes document span payload
|
|
122
121
|
* @default true
|
|
123
122
|
*/
|
|
124
|
-
schemifyDocSpanPayload?: boolean
|
|
123
|
+
schemifyDocSpanPayload?: boolean;
|
|
125
124
|
|
|
126
125
|
/**
|
|
127
126
|
* (Optional) Maximum size for capturing HTTP payload
|
|
128
127
|
* @default 100000
|
|
129
128
|
*/
|
|
130
|
-
maxCapturingHttpPayloadSize?: number
|
|
129
|
+
maxCapturingHttpPayloadSize?: number;
|
|
131
130
|
|
|
132
131
|
/** If true, captures body in traces
|
|
133
132
|
* @default true
|
|
134
|
-
|
|
135
|
-
captureBody?: boolean
|
|
133
|
+
*/
|
|
134
|
+
captureBody?: boolean;
|
|
136
135
|
/** If true, captures headers in traces
|
|
137
136
|
* @default true
|
|
138
|
-
|
|
139
|
-
captureHeaders?: boolean
|
|
137
|
+
*/
|
|
138
|
+
captureHeaders?: boolean;
|
|
140
139
|
/**
|
|
141
140
|
* (Optional) Configuration for masking sensitive data in session recordings
|
|
142
141
|
* @default { maskAllInputs: true, isContentMaskingEnabled: true }
|
|
143
142
|
*/
|
|
144
|
-
masking?: MaskingOptions
|
|
143
|
+
masking?: MaskingOptions;
|
|
145
144
|
/** Whether to record gestures */
|
|
146
|
-
recordGestures?: boolean
|
|
145
|
+
recordGestures?: boolean;
|
|
147
146
|
/** Whether to record navigation */
|
|
148
|
-
recordNavigation?: boolean
|
|
147
|
+
recordNavigation?: boolean;
|
|
149
148
|
/** Whether to record screen */
|
|
150
|
-
recordScreen?: boolean
|
|
149
|
+
recordScreen?: boolean;
|
|
151
150
|
/**
|
|
152
151
|
* (Optional) Logger configuration overrides
|
|
153
152
|
* Allows setting log level, console enabling, and prefix customizations
|
|
154
153
|
*/
|
|
155
154
|
logger?: {
|
|
156
|
-
level?: number
|
|
157
|
-
enabled?: boolean
|
|
158
|
-
}
|
|
155
|
+
level?: number;
|
|
156
|
+
enabled?: boolean;
|
|
157
|
+
};
|
|
159
158
|
}
|
|
160
159
|
|
|
161
|
-
|
|
162
160
|
/**
|
|
163
161
|
* Interface for customizable widget text configuration
|
|
164
162
|
* Allows overriding default text labels and messages in the UI
|
|
165
163
|
*/
|
|
166
164
|
export interface TextOverridesOptions {
|
|
167
165
|
/** Title for the initial popover when continuous recording is enabled */
|
|
168
|
-
initialTitleWithContinuous?: string
|
|
166
|
+
initialTitleWithContinuous?: string;
|
|
169
167
|
/** Title for the initial popover when continuous recording is disabled */
|
|
170
|
-
initialTitleWithoutContinuous?: string
|
|
168
|
+
initialTitleWithoutContinuous?: string;
|
|
171
169
|
/** Description for the initial popover when continuous recording is enabled */
|
|
172
|
-
initialDescriptionWithContinuous?: string
|
|
170
|
+
initialDescriptionWithContinuous?: string;
|
|
173
171
|
/** Description for the initial popover when continuous recording is disabled */
|
|
174
|
-
initialDescriptionWithoutContinuous?: string
|
|
172
|
+
initialDescriptionWithoutContinuous?: string;
|
|
175
173
|
/** Label for the continuous recording toggle */
|
|
176
|
-
continuousRecordingLabel?: string
|
|
174
|
+
continuousRecordingLabel?: string;
|
|
177
175
|
/** Text for the start recording button */
|
|
178
|
-
startRecordingButtonText?: string
|
|
176
|
+
startRecordingButtonText?: string;
|
|
179
177
|
/** Title for the final popover */
|
|
180
|
-
finalTitle?: string
|
|
178
|
+
finalTitle?: string;
|
|
181
179
|
/** Description for the final popover */
|
|
182
|
-
finalDescription?: string
|
|
180
|
+
finalDescription?: string;
|
|
183
181
|
/** Placeholder text for the comment textarea */
|
|
184
|
-
commentPlaceholder?: string
|
|
182
|
+
commentPlaceholder?: string;
|
|
185
183
|
/** Text for the save button in final popover */
|
|
186
|
-
saveButtonText?: string
|
|
184
|
+
saveButtonText?: string;
|
|
187
185
|
/** Text for the cancel button in final popover */
|
|
188
|
-
cancelButtonText?: string
|
|
186
|
+
cancelButtonText?: string;
|
|
189
187
|
/** Title for the continuous recording overlay */
|
|
190
|
-
continuousOverlayTitle?: string
|
|
188
|
+
continuousOverlayTitle?: string;
|
|
191
189
|
/** Description for the continuous recording overlay */
|
|
192
|
-
continuousOverlayDescription?: string
|
|
190
|
+
continuousOverlayDescription?: string;
|
|
193
191
|
/** Text for the save last snapshot button */
|
|
194
|
-
saveLastSnapshotButtonText?: string
|
|
192
|
+
saveLastSnapshotButtonText?: string;
|
|
195
193
|
/** Title for the submit session dialog */
|
|
196
|
-
submitDialogTitle?: string
|
|
194
|
+
submitDialogTitle?: string;
|
|
197
195
|
/** Subtitle for the submit session dialog */
|
|
198
|
-
submitDialogSubtitle?: string
|
|
196
|
+
submitDialogSubtitle?: string;
|
|
199
197
|
/** Label for the comment field in submit dialog */
|
|
200
|
-
submitDialogCommentLabel?: string
|
|
198
|
+
submitDialogCommentLabel?: string;
|
|
201
199
|
/** Placeholder for the comment field in submit dialog */
|
|
202
|
-
submitDialogCommentPlaceholder?: string
|
|
200
|
+
submitDialogCommentPlaceholder?: string;
|
|
203
201
|
/** Text for the submit button in dialog */
|
|
204
|
-
submitDialogSubmitText?: string
|
|
202
|
+
submitDialogSubmitText?: string;
|
|
205
203
|
/** Text for the cancel button in dialog */
|
|
206
|
-
submitDialogCancelText?: string
|
|
204
|
+
submitDialogCancelText?: string;
|
|
207
205
|
}
|
|
208
206
|
|
|
209
207
|
/**
|
|
@@ -213,35 +211,35 @@ export interface TextOverridesOptions {
|
|
|
213
211
|
export interface MaskingOptions {
|
|
214
212
|
// Span masking
|
|
215
213
|
/** If true, enables masking for debug span payload in traces */
|
|
216
|
-
isContentMaskingEnabled?: boolean
|
|
214
|
+
isContentMaskingEnabled?: boolean;
|
|
217
215
|
/** Custom function for masking body in traces */
|
|
218
|
-
maskBody?: (payload: any, span: Span) => any
|
|
216
|
+
maskBody?: (payload: any, span: Span) => any;
|
|
219
217
|
/** Custom function for masking headers in traces */
|
|
220
|
-
maskHeaders?: (headers: any, span: any) => any
|
|
218
|
+
maskHeaders?: (headers: any, span: any) => any;
|
|
221
219
|
|
|
222
220
|
/** List of body fields to mask in traces */
|
|
223
|
-
maskBodyFieldsList?: string[]
|
|
221
|
+
maskBodyFieldsList?: string[];
|
|
224
222
|
/** List of headers to mask in traces */
|
|
225
|
-
maskHeadersList?: string[]
|
|
223
|
+
maskHeadersList?: string[];
|
|
226
224
|
|
|
227
225
|
/** List of headers to include in traces (if specified, only these headers will be captured) */
|
|
228
|
-
headersToInclude?: string[]
|
|
226
|
+
headersToInclude?: string[];
|
|
229
227
|
/** List of headers to exclude from traces */
|
|
230
|
-
headersToExclude?: string[]
|
|
228
|
+
headersToExclude?: string[];
|
|
231
229
|
|
|
232
230
|
// Screen masking options
|
|
233
231
|
/** Whether to mask text inputs (UITextField, UITextView, React Native text components) */
|
|
234
|
-
maskTextInputs?: boolean
|
|
232
|
+
maskTextInputs?: boolean;
|
|
235
233
|
/** Whether to mask images (UIImageView, React Native Image components) */
|
|
236
|
-
maskImages?: boolean
|
|
234
|
+
maskImages?: boolean;
|
|
237
235
|
/** Whether to mask buttons (UIButton) */
|
|
238
|
-
maskButtons?: boolean
|
|
236
|
+
maskButtons?: boolean;
|
|
239
237
|
/** Whether to mask labels (UILabel) */
|
|
240
|
-
maskLabels?: boolean
|
|
238
|
+
maskLabels?: boolean;
|
|
241
239
|
/** Whether to mask web views (WKWebView) */
|
|
242
|
-
maskWebViews?: boolean
|
|
240
|
+
maskWebViews?: boolean;
|
|
243
241
|
/** Whether to mask sandboxed views (system views that don't belong to current process) */
|
|
244
|
-
maskSandboxedViews?: boolean
|
|
242
|
+
maskSandboxedViews?: boolean;
|
|
245
243
|
}
|
|
246
244
|
/**
|
|
247
245
|
* Main interface for the Session Recorder
|
|
@@ -251,104 +249,101 @@ export interface ISessionRecorder {
|
|
|
251
249
|
/**
|
|
252
250
|
* The current session ID
|
|
253
251
|
*/
|
|
254
|
-
readonly sessionId: string | null
|
|
252
|
+
readonly sessionId: string | null;
|
|
255
253
|
|
|
256
254
|
/**
|
|
257
255
|
* Whether continuous recording is enabled
|
|
258
256
|
*/
|
|
259
|
-
readonly continuousRecording: boolean
|
|
257
|
+
readonly continuousRecording: boolean;
|
|
260
258
|
|
|
261
259
|
/**
|
|
262
260
|
* The current debug session object
|
|
263
261
|
*/
|
|
264
|
-
readonly session: ISession | null
|
|
262
|
+
readonly session: ISession | null;
|
|
265
263
|
|
|
266
264
|
/**
|
|
267
265
|
* The type of session (plain or continuous)
|
|
268
266
|
*/
|
|
269
|
-
readonly sessionType: SessionType
|
|
267
|
+
readonly sessionType: SessionType;
|
|
270
268
|
|
|
271
269
|
/**
|
|
272
270
|
* The current state of the session
|
|
273
271
|
*/
|
|
274
|
-
readonly sessionState: SessionState | null
|
|
275
|
-
|
|
272
|
+
readonly sessionState: SessionState | null;
|
|
276
273
|
|
|
277
274
|
/**
|
|
278
275
|
* Session attributes for additional context
|
|
279
276
|
*/
|
|
280
|
-
readonly sessionAttributes: Record<string, any
|
|
277
|
+
readonly sessionAttributes: Record<string, any>;
|
|
281
278
|
|
|
282
279
|
/**
|
|
283
280
|
* Current error message
|
|
284
281
|
*/
|
|
285
|
-
error: string
|
|
282
|
+
error: string;
|
|
286
283
|
|
|
287
284
|
/**
|
|
288
285
|
* The HTML button element for the session widget's recorder button
|
|
289
286
|
*/
|
|
290
|
-
readonly sessionWidgetButtonElement: HTMLButtonElement
|
|
287
|
+
readonly sessionWidgetButtonElement: HTMLButtonElement;
|
|
291
288
|
|
|
292
289
|
/**
|
|
293
290
|
* Initialize the session debugger with custom configurations
|
|
294
291
|
* @param configs - custom configurations for session debugger
|
|
295
292
|
*/
|
|
296
|
-
init(configs: SessionRecorderOptions): void
|
|
293
|
+
init(configs: SessionRecorderOptions): void;
|
|
297
294
|
|
|
298
295
|
/**
|
|
299
296
|
* Save the continuous recording session
|
|
300
297
|
* @returns Promise that resolves to the save response
|
|
301
298
|
*/
|
|
302
|
-
save(): Promise<any
|
|
299
|
+
save(): Promise<any>;
|
|
303
300
|
|
|
304
301
|
/**
|
|
305
302
|
* Start a new session
|
|
306
303
|
* @param type - the type of session to start
|
|
307
304
|
* @param session - optional existing session to start
|
|
308
305
|
*/
|
|
309
|
-
start(type?: SessionType, session?: ISession): void
|
|
306
|
+
start(type?: SessionType, session?: ISession): void;
|
|
310
307
|
|
|
311
308
|
/**
|
|
312
309
|
* Stop the current session with an optional comment
|
|
313
310
|
* @param comment - user-provided comment to include in session feedback metadata
|
|
314
311
|
*/
|
|
315
|
-
stop(comment?: string): Promise<void
|
|
312
|
+
stop(comment?: string): Promise<void>;
|
|
316
313
|
|
|
317
314
|
/**
|
|
318
315
|
* Cancel the current session
|
|
319
316
|
*/
|
|
320
|
-
cancel(): Promise<void
|
|
317
|
+
cancel(): Promise<void>;
|
|
321
318
|
|
|
322
319
|
/**
|
|
323
320
|
* Pause the current session
|
|
324
321
|
*/
|
|
325
|
-
pause(): Promise<void
|
|
322
|
+
pause(): Promise<void>;
|
|
326
323
|
|
|
327
324
|
/**
|
|
328
325
|
* Resume the current session
|
|
329
326
|
*/
|
|
330
|
-
resume(): Promise<void
|
|
327
|
+
resume(): Promise<void>;
|
|
331
328
|
|
|
332
329
|
/**
|
|
333
330
|
* Set the session metadata
|
|
334
331
|
* @param attributes - the attributes to set
|
|
335
332
|
*/
|
|
336
|
-
setSessionAttributes(attributes: Record<string, any>): void
|
|
333
|
+
setSessionAttributes(attributes: Record<string, any>): void;
|
|
337
334
|
}
|
|
338
335
|
|
|
339
|
-
|
|
340
|
-
|
|
341
336
|
/**
|
|
342
337
|
* Interface representing screen capture events
|
|
343
338
|
* Contains metadata about screen recordings
|
|
344
339
|
*/
|
|
345
340
|
export interface ScreenEvent {
|
|
346
|
-
screenName: string
|
|
347
|
-
timestamp: number
|
|
348
|
-
params?: Record<string, any
|
|
349
|
-
type?: string
|
|
350
|
-
metadata?: Record<string, any
|
|
351
|
-
dataUrl?: string
|
|
341
|
+
screenName: string;
|
|
342
|
+
timestamp: number;
|
|
343
|
+
params?: Record<string, any>;
|
|
344
|
+
type?: string;
|
|
345
|
+
metadata?: Record<string, any>;
|
|
346
|
+
dataUrl?: string;
|
|
352
347
|
}
|
|
353
348
|
|
|
354
349
|
/**
|
|
@@ -356,21 +351,21 @@ export interface ScreenEvent {
|
|
|
356
351
|
* Contains information about user interactions with the screen
|
|
357
352
|
*/
|
|
358
353
|
export interface GestureEvent {
|
|
359
|
-
type: string
|
|
360
|
-
timestamp: number
|
|
361
|
-
x?: number
|
|
362
|
-
y?: number
|
|
363
|
-
direction?: string
|
|
364
|
-
target?: string
|
|
365
|
-
coordinates?: { x: number; y: number }
|
|
354
|
+
type: string;
|
|
355
|
+
timestamp: number;
|
|
356
|
+
x?: number;
|
|
357
|
+
y?: number;
|
|
358
|
+
direction?: string;
|
|
359
|
+
target?: string;
|
|
360
|
+
coordinates?: { x: number; y: number };
|
|
366
361
|
targetInfo?: {
|
|
367
|
-
identifier: string
|
|
368
|
-
label?: string
|
|
369
|
-
role?: string
|
|
370
|
-
testId?: string
|
|
371
|
-
text?: string
|
|
372
|
-
}
|
|
373
|
-
metadata?: Record<string, any
|
|
362
|
+
identifier: string;
|
|
363
|
+
label?: string;
|
|
364
|
+
role?: string;
|
|
365
|
+
testId?: string;
|
|
366
|
+
text?: string;
|
|
367
|
+
};
|
|
368
|
+
metadata?: Record<string, any>;
|
|
374
369
|
}
|
|
375
370
|
|
|
376
371
|
/**
|
|
@@ -378,9 +373,9 @@ export interface GestureEvent {
|
|
|
378
373
|
* Contains information about screen/route changes
|
|
379
374
|
*/
|
|
380
375
|
export interface NavigationEvent {
|
|
381
|
-
type: string
|
|
382
|
-
timestamp: number
|
|
383
|
-
routeName?: string
|
|
384
|
-
params?: Record<string, any
|
|
385
|
-
metadata?: Record<string, any
|
|
376
|
+
type: string;
|
|
377
|
+
timestamp: number;
|
|
378
|
+
routeName?: string;
|
|
379
|
+
params?: Record<string, any>;
|
|
380
|
+
metadata?: Record<string, any>;
|
|
386
381
|
}
|