File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -199,17 +199,18 @@ export class ReplayContainer implements ReplayContainerInterface {
199
199
...( this . recordingMode === 'error' && { checkoutEveryNms : ERROR_CHECKOUT_TIME } ) ,
200
200
emit : this . _handleRecordingEmit ,
201
201
onMutation : ( mutations : unknown [ ] ) => {
202
- const count = mutations . length ;
203
-
204
- if ( count > 500 ) {
205
- const breadcrumb = createBreadcrumb ( {
206
- category : 'replay.mutations' ,
207
- message : `A mutation with ${ count } changes was recorded, which may indicate slow performance.` ,
208
- data : {
209
- mutationsCount : count ,
210
- } ,
211
- } ) ;
212
- this . _createCustomBreadcrumb ( breadcrumb ) ;
202
+ if ( this . _options . _experiments . captureMutationSize ) {
203
+ const count = mutations . length ;
204
+
205
+ if ( count > 500 ) {
206
+ const breadcrumb = createBreadcrumb ( {
207
+ category : 'replay.mutations' ,
208
+ data : {
209
+ length : count ,
210
+ } ,
211
+ } ) ;
212
+ this . _createCustomBreadcrumb ( breadcrumb ) ;
213
+ }
213
214
}
214
215
// `true` means we use the regular mutation handling by rrweb
215
216
return true ;
Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ export interface ReplayPluginOptions extends SessionOptions {
105
105
_experiments : Partial < {
106
106
captureExceptions : boolean ;
107
107
traceInternals : boolean ;
108
+ captureMutationSize : boolean ;
108
109
} > ;
109
110
}
110
111
You can’t perform that action at this time.
0 commit comments