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 {
204204 // instead, we'll always keep the last 60 seconds of replay before an error happened
205205 ...( this . recordingMode === 'error' && { checkoutEveryNms : ERROR_CHECKOUT_TIME } ) ,
206206 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+ } ,
207222 } ) ;
208223 } catch ( err ) {
209224 this . _handleException ( err ) ;
You can’t perform that action at this time.
0 commit comments