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