@@ -360,7 +360,7 @@ impl BatchLogProcessor {
360
360
logs : & mut Vec < LogsData > ,
361
361
last_export_time : & mut Instant ,
362
362
current_batch_size : & AtomicUsize ,
363
- config : & BatchConfig ,
363
+ max_export_size : usize ,
364
364
) -> OTelSdkResult
365
365
where
366
366
E : LogExporter + Send + Sync + ' static ,
@@ -373,7 +373,7 @@ impl BatchLogProcessor {
373
373
// Get upto `max_export_batch_size` amount of logs log records from the channel and push them to the logs vec
374
374
while let Ok ( log) = logs_receiver. try_recv ( ) {
375
375
logs. push ( log) ;
376
- if logs. len ( ) == config . max_export_batch_size {
376
+ if logs. len ( ) == max_export_size {
377
377
break ;
378
378
}
379
379
}
@@ -409,7 +409,7 @@ impl BatchLogProcessor {
409
409
& mut logs,
410
410
& mut last_export_time,
411
411
& current_batch_size,
412
- & config ,
412
+ max_export_batch_size ,
413
413
) ;
414
414
}
415
415
Ok ( BatchMessage :: ForceFlush ( sender) ) => {
@@ -420,7 +420,7 @@ impl BatchLogProcessor {
420
420
& mut logs,
421
421
& mut last_export_time,
422
422
& current_batch_size,
423
- & config ,
423
+ max_export_batch_size ,
424
424
) ;
425
425
let _ = sender. send ( result) ;
426
426
}
@@ -432,7 +432,7 @@ impl BatchLogProcessor {
432
432
& mut logs,
433
433
& mut last_export_time,
434
434
& current_batch_size,
435
- & config ,
435
+ max_export_batch_size ,
436
436
) ;
437
437
let _ = exporter. shutdown ( ) ;
438
438
let _ = sender. send ( result) ;
@@ -460,7 +460,7 @@ impl BatchLogProcessor {
460
460
& mut logs,
461
461
& mut last_export_time,
462
462
& current_batch_size,
463
- & config ,
463
+ max_export_batch_size ,
464
464
) ;
465
465
}
466
466
Err ( RecvTimeoutError :: Disconnected ) => {
0 commit comments