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({
66 flushMaxDelay : 200 ,
77 minReplayDuration : 0 ,
88 useCompression : false ,
9- ignoreMutations : [ '.moving' ] ,
9+ _experiments : {
10+ ignoreMutations : [ '.moving' ] ,
11+ } ,
1012} ) ;
1113
1214Sentry . init ( {
Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ export class Replay implements Integration {
8484
8585 mutationBreadcrumbLimit = 750 ,
8686 mutationLimit = 10_000 ,
87- ignoreMutations = [ ] ,
8887
8988 slowClickTimeout = 7_000 ,
9089 slowClickIgnoreSelectors = [ ] ,
@@ -168,7 +167,6 @@ export class Replay implements Integration {
168167 maskAllText,
169168 mutationBreadcrumbLimit,
170169 mutationLimit,
171- ignoreMutations,
172170 slowClickTimeout,
173171 slowClickIgnoreSelectors,
174172 networkDetailAllowUrls,
Original file line number Diff line number Diff line change @@ -1305,8 +1305,8 @@ export class ReplayContainer implements ReplayContainerInterface {
13051305
13061306 /** Handler for rrweb.record.onMutation */
13071307 private _onMutationHandler ( mutations : MutationRecord [ ] ) : boolean {
1308- const { ignoreMutations } = this . _options ;
1309- if ( ignoreMutations . length ) {
1308+ const { ignoreMutations } = this . _options . _experiments ;
1309+ if ( ignoreMutations ? .length ) {
13101310 if (
13111311 mutations . some ( mutation => {
13121312 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 {
161161 */
162162 mutationLimit : number ;
163163
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-
172164 /**
173165 * The max. time in ms to wait for a slow click to finish.
174166 * After this amount of time we stop waiting for actions after a click happened.
@@ -242,6 +234,13 @@ export interface ReplayPluginOptions extends ReplayNetworkOptions {
242234 */
243235 recordCrossOriginIframes : boolean ;
244236 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 [ ] ;
245244 } > ;
246245}
247246
You can’t perform that action at this time.
0 commit comments