File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,21 @@ export class ReplayContainer implements ReplayContainerInterface {
204
204
// instead, we'll always keep the last 60 seconds of replay before an error happened
205
205
...( this . recordingMode === 'error' && { checkoutEveryNms : ERROR_CHECKOUT_TIME } ) ,
206
206
emit : this . _handleRecordingEmit ,
207
+ onMutation : ( mutations : unknown [ ] ) => {
208
+ const count = mutations . length ;
209
+
210
+ if ( count > 500 ) {
211
+ const breadcrumb = createBreadcrumb ( {
212
+ category : 'replay.mutations' ,
213
+ message : `A mutation with ${ count } changes was recorded, which indicate slow performance.` ,
214
+ data : {
215
+ mutationsCount : count ,
216
+ } ,
217
+ } ) ;
218
+ this . _createCustomBreadcrumb ( breadcrumb ) ;
219
+ }
220
+ return true ;
221
+ } ,
207
222
} ) ;
208
223
} catch ( err ) {
209
224
this . _handleException ( err ) ;
You can’t perform that action at this time.
0 commit comments