File tree Expand file tree Collapse file tree 4 files changed +12
-13
lines changed
dev-packages/browser-integration-tests/suites/replay/ignoreMutations
packages/replay-internal/src Expand file tree Collapse file tree 4 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ window.Replay = Sentry.replayIntegration({
6
6
flushMaxDelay : 200 ,
7
7
minReplayDuration : 0 ,
8
8
useCompression : false ,
9
- ignoreMutations : [ '.moving' ] ,
9
+ _experiments : {
10
+ ignoreMutations : [ '.moving' ] ,
11
+ } ,
10
12
} ) ;
11
13
12
14
Sentry . init ( {
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ export class Replay implements Integration {
84
84
85
85
mutationBreadcrumbLimit = 750 ,
86
86
mutationLimit = 10_000 ,
87
- ignoreMutations = [ ] ,
88
87
89
88
slowClickTimeout = 7_000 ,
90
89
slowClickIgnoreSelectors = [ ] ,
@@ -168,7 +167,6 @@ export class Replay implements Integration {
168
167
maskAllText,
169
168
mutationBreadcrumbLimit,
170
169
mutationLimit,
171
- ignoreMutations,
172
170
slowClickTimeout,
173
171
slowClickIgnoreSelectors,
174
172
networkDetailAllowUrls,
Original file line number Diff line number Diff line change @@ -1305,8 +1305,8 @@ export class ReplayContainer implements ReplayContainerInterface {
1305
1305
1306
1306
/** Handler for rrweb.record.onMutation */
1307
1307
private _onMutationHandler ( mutations : MutationRecord [ ] ) : boolean {
1308
- const { ignoreMutations } = this . _options ;
1309
- if ( ignoreMutations . length ) {
1308
+ const { ignoreMutations } = this . _options . _experiments ;
1309
+ if ( ignoreMutations ? .length ) {
1310
1310
if (
1311
1311
mutations . some ( mutation => {
1312
1312
const el = rrwebUtils . closestElementOfNode ( mutation . target ) ;
Original file line number Diff line number Diff line change @@ -161,14 +161,6 @@ export interface ReplayPluginOptions extends ReplayNetworkOptions {
161
161
*/
162
162
mutationLimit : number ;
163
163
164
- /**
165
- * Completetly ignore mutations matching the given selectors.
166
- * This can be used if a specific type of mutation is causing (e.g. performance) problems.
167
- * NOTE: This can be dangerous to use, as mutations are applied as incremental patches.
168
- * Make sure to verify that the captured replays still work when using this option.
169
- */
170
- ignoreMutations : string [ ] ;
171
-
172
164
/**
173
165
* The max. time in ms to wait for a slow click to finish.
174
166
* After this amount of time we stop waiting for actions after a click happened.
@@ -242,6 +234,13 @@ export interface ReplayPluginOptions extends ReplayNetworkOptions {
242
234
*/
243
235
recordCrossOriginIframes : boolean ;
244
236
autoFlushOnFeedback : boolean ;
237
+ /**
238
+ * Completetly ignore mutations matching the given selectors.
239
+ * This can be used if a specific type of mutation is causing (e.g. performance) problems.
240
+ * NOTE: This can be dangerous to use, as mutations are applied as incremental patches.
241
+ * Make sure to verify that the captured replays still work when using this option.
242
+ */
243
+ ignoreMutations : string [ ] ;
245
244
} > ;
246
245
}
247
246
You can’t perform that action at this time.
0 commit comments