@@ -34,13 +34,13 @@ export class Replay implements Integration {
34
34
/**
35
35
* Options to pass to `rrweb.record()`
36
36
*/
37
- readonly recordingOptions : RecordingOptions ;
37
+ private readonly _recordingOptions : RecordingOptions ;
38
38
39
- readonly options : ReplayPluginOptions ;
39
+ private readonly _options : ReplayPluginOptions ;
40
40
41
41
private _replay ?: ReplayContainer ;
42
42
43
- constructor ( {
43
+ public constructor ( {
44
44
flushMinDelay = DEFAULT_FLUSH_MIN_DELAY ,
45
45
flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY ,
46
46
initialFlushDelay = INITIAL_FLUSH_DELAY ,
@@ -57,19 +57,19 @@ export class Replay implements Integration {
57
57
ignoreClass = 'sentry-ignore' ,
58
58
maskTextClass = 'sentry-mask' ,
59
59
blockSelector = '[data-sentry-block]' ,
60
- ...recordingOptions
60
+ ..._recordingOptions
61
61
} : ReplayConfiguration = { } ) {
62
- this . recordingOptions = {
62
+ this . _recordingOptions = {
63
63
maskAllInputs,
64
64
blockClass,
65
65
ignoreClass,
66
66
maskTextClass,
67
67
maskTextSelector,
68
68
blockSelector,
69
- ...recordingOptions ,
69
+ ..._recordingOptions ,
70
70
} ;
71
71
72
- this . options = {
72
+ this . _options = {
73
73
flushMinDelay,
74
74
flushMaxDelay,
75
75
stickySession,
@@ -91,7 +91,7 @@ Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options
91
91
Sentry.init({ replaysSessionSampleRate: ${ sessionSampleRate } })` ,
92
92
) ;
93
93
94
- this . options . sessionSampleRate = sessionSampleRate ;
94
+ this . _options . sessionSampleRate = sessionSampleRate ;
95
95
}
96
96
97
97
if ( typeof errorSampleRate === 'number' ) {
@@ -103,22 +103,22 @@ Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options
103
103
Sentry.init({ replaysOnErrorSampleRate: ${ errorSampleRate } })` ,
104
104
) ;
105
105
106
- this . options . errorSampleRate = errorSampleRate ;
106
+ this . _options . errorSampleRate = errorSampleRate ;
107
107
}
108
108
109
- if ( this . options . maskAllText ) {
109
+ if ( this . _options . maskAllText ) {
110
110
// `maskAllText` is a more user friendly option to configure
111
111
// `maskTextSelector`. This means that all nodes will have their text
112
112
// content masked.
113
- this . recordingOptions . maskTextSelector = MASK_ALL_TEXT_SELECTOR ;
113
+ this . _recordingOptions . maskTextSelector = MASK_ALL_TEXT_SELECTOR ;
114
114
}
115
115
116
- if ( this . options . blockAllMedia ) {
116
+ if ( this . _options . blockAllMedia ) {
117
117
// `blockAllMedia` is a more user friendly option to configure blocking
118
118
// embedded media elements
119
- this . recordingOptions . blockSelector = ! this . recordingOptions . blockSelector
119
+ this . _recordingOptions . blockSelector = ! this . _recordingOptions . blockSelector
120
120
? MEDIA_SELECTORS
121
- : `${ this . recordingOptions . blockSelector } ,${ MEDIA_SELECTORS } ` ;
121
+ : `${ this . _recordingOptions . blockSelector } ,${ MEDIA_SELECTORS } ` ;
122
122
}
123
123
124
124
if ( this . _isInitialized && isBrowser ( ) ) {
@@ -148,7 +148,7 @@ Sentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,
148
148
* global event processors to finish. This is no longer needed, but keeping it
149
149
* here to avoid any future issues.
150
150
*/
151
- setupOnce ( ) : void {
151
+ public setupOnce ( ) : void {
152
152
if ( ! isBrowser ( ) ) {
153
153
return ;
154
154
}
@@ -165,7 +165,7 @@ Sentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,
165
165
* Creates or loads a session, attaches listeners to varying events (DOM,
166
166
* PerformanceObserver, Recording, Sentry SDK, etc)
167
167
*/
168
- start ( ) : void {
168
+ public start ( ) : void {
169
169
if ( ! this . _replay ) {
170
170
return ;
171
171
}
@@ -177,7 +177,7 @@ Sentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,
177
177
* Currently, this needs to be manually called (e.g. for tests). Sentry SDK
178
178
* does not support a teardown
179
179
*/
180
- stop ( ) : void {
180
+ public stop ( ) : void {
181
181
if ( ! this . _replay ) {
182
182
return ;
183
183
}
@@ -191,8 +191,8 @@ Sentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,
191
191
this . _loadReplayOptionsFromClient ( ) ;
192
192
193
193
this . _replay = new ReplayContainer ( {
194
- options : this . options ,
195
- recordingOptions : this . recordingOptions ,
194
+ options : this . _options ,
195
+ recordingOptions : this . _recordingOptions ,
196
196
} ) ;
197
197
}
198
198
@@ -202,11 +202,11 @@ Sentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,
202
202
const opt = client && ( client . getOptions ( ) as BrowserClientReplayOptions | undefined ) ;
203
203
204
204
if ( opt && typeof opt . replaysSessionSampleRate === 'number' ) {
205
- this . options . sessionSampleRate = opt . replaysSessionSampleRate ;
205
+ this . _options . sessionSampleRate = opt . replaysSessionSampleRate ;
206
206
}
207
207
208
208
if ( opt && typeof opt . replaysOnErrorSampleRate === 'number' ) {
209
- this . options . errorSampleRate = opt . replaysOnErrorSampleRate ;
209
+ this . _options . errorSampleRate = opt . replaysOnErrorSampleRate ;
210
210
}
211
211
}
212
212
}
0 commit comments