File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -450,7 +450,7 @@ <h2>Test Vue integration: <test-component></h2>
450
450
if ( message . catcherType === 'performance' ) {
451
451
lastBatchTime = new Date ( ) ;
452
452
document . getElementById ( 'batchStats' ) . textContent =
453
- `Last batch sent: ${ lastBatchTime . toLocaleTimeString ( ) } (${ message . payload . length } transactions)` ;
453
+ `Last batch sent: ${ lastBatchTime . toLocaleTimeString ( ) } (${ message . payload . transactions . length } transactions)` ;
454
454
}
455
455
return originalSend . call ( this , data ) ;
456
456
} ;
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ export default class PerformanceMonitoring {
123
123
public destroy ( ) : void {
124
124
// Clear batch sending timer
125
125
if ( this . batchTimeout !== null ) {
126
- const clear = isBrowser ? window . clearInterval : clearInterval ;
126
+ const clear = isBrowser ? window . clearTimeout : clearTimeout ;
127
127
128
128
clear ( this . batchTimeout ) ;
129
129
this . batchTimeout = null ;
@@ -170,8 +170,11 @@ export default class PerformanceMonitoring {
170
170
* Schedule periodic batch sending of transactions
171
171
*/
172
172
private scheduleBatchSend ( ) : void {
173
- // Устанавливаем интервал для последующих отправок
174
- this . batchTimeout = setInterval ( ( ) => void this . processSendQueue ( ) , this . batchInterval ) ;
173
+ this . batchTimeout = setTimeout ( ( ) => {
174
+ void this . processSendQueue ( ) ;
175
+
176
+ this . scheduleBatchSend ( ) ; // Schedule next batch
177
+ } , this . batchInterval ) ;
175
178
}
176
179
177
180
/**
You can’t perform that action at this time.
0 commit comments