@@ -384,8 +384,9 @@ impl BatchLogProcessor {
384384 ) ;
385385 }
386386 Err ( err) => {
387+ // TODO: this should not happen! Log the error and continue for now.
387388 otel_error ! (
388- name: "BatchLogProcessor.ReceiveError " ,
389+ name: "BatchLogProcessor.InternalError " ,
389390 error = format!( "{}" , err)
390391 ) ;
391392 }
@@ -417,6 +418,7 @@ impl BatchLogProcessor {
417418 }
418419}
419420
421+ #[ allow( clippy:: vec_box) ]
420422fn export_with_timeout_sync < E > (
421423 _: Duration , // TODO, enforcing timeout in exporter.
422424 exporter : & mut E ,
@@ -440,7 +442,7 @@ where
440442 let export_result = futures_executor:: block_on ( export) ;
441443
442444 match export_result {
443- Ok ( __ ) => LogResult :: Ok ( ( ) ) ,
445+ Ok ( _ ) => LogResult :: Ok ( ( ) ) ,
444446 Err ( err) => {
445447 otel_error ! (
446448 name: "BatchLogProcessor.ExportError" ,
@@ -717,6 +719,7 @@ where
717719/// Batch log processor configuration.
718720/// Use [`BatchConfigBuilder`] to configure your own instance of [`BatchConfig`].
719721#[ derive( Debug ) ]
722+ #[ allow( dead_code) ]
720723pub struct BatchConfig {
721724 /// The maximum queue size to buffer logs for delayed processing. If the
722725 /// queue gets full it drops the logs. The default value of is 2048.
@@ -1138,6 +1141,10 @@ mod tests {
11381141 . build ( ) ,
11391142 )
11401143 . build ( ) ;
1144+
1145+ // wait for the batch processor to process the resource.
1146+ tokio:: time:: sleep ( Duration :: from_millis ( 100 ) ) . await ;
1147+
11411148 assert_eq ! ( exporter. get_resource( ) . unwrap( ) . into_iter( ) . count( ) , 5 ) ;
11421149 let _ = provider. shutdown ( ) ;
11431150 }
0 commit comments