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 @@ -198,6 +198,21 @@ export class ReplayContainer implements ReplayContainerInterface {
198
198
// instead, we'll always keep the last 60 seconds of replay before an error happened
199
199
...( this . recordingMode === 'error' && { checkoutEveryNms : ERROR_CHECKOUT_TIME } ) ,
200
200
emit : this . _handleRecordingEmit ,
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 indicate slow performance.` ,
208
+ data : {
209
+ mutationsCount : count ,
210
+ } ,
211
+ } ) ;
212
+ this . _createCustomBreadcrumb ( breadcrumb ) ;
213
+ }
214
+ return true ;
215
+ } ,
201
216
} ) ;
202
217
} catch ( err ) {
203
218
this . _handleException ( err ) ;
You can’t perform that action at this time.
0 commit comments