@@ -45,7 +45,7 @@ pub(crate) const OTEL_BLRP_SCHEDULE_DELAY_DEFAULT: Duration = Duration::from_mil
4545pub ( crate ) const OTEL_BLRP_EXPORT_TIMEOUT : & str = "OTEL_BLRP_EXPORT_TIMEOUT" ;
4646/// Default maximum allowed time to export data.
4747#[ cfg( feature = "experimental_logs_batch_log_processor_with_async_runtime" ) ]
48- pub ( crate ) const OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT : u64 = 30_000 ;
48+ pub ( crate ) const OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT : Duration = Duration :: from_millis ( 30_000 ) ;
4949/// Maximum queue size.
5050pub ( crate ) const OTEL_BLRP_MAX_QUEUE_SIZE : & str = "OTEL_BLRP_MAX_QUEUE_SIZE" ;
5151/// Default maximum queue size.
@@ -619,7 +619,7 @@ impl Default for BatchConfigBuilder {
619619 scheduled_delay : OTEL_BLRP_SCHEDULE_DELAY_DEFAULT ,
620620 max_export_batch_size : OTEL_BLRP_MAX_EXPORT_BATCH_SIZE_DEFAULT ,
621621 #[ cfg( feature = "experimental_logs_batch_log_processor_with_async_runtime" ) ]
622- max_export_timeout : Duration :: from_millis ( OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT ) ,
622+ max_export_timeout : OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT ,
623623 }
624624 . init_from_env_vars ( )
625625 }
@@ -740,7 +740,7 @@ mod tests {
740740 #[ cfg( feature = "experimental_logs_batch_log_processor_with_async_runtime" ) ]
741741 assert_eq ! ( OTEL_BLRP_EXPORT_TIMEOUT , "OTEL_BLRP_EXPORT_TIMEOUT" ) ;
742742 #[ cfg( feature = "experimental_logs_batch_log_processor_with_async_runtime" ) ]
743- assert_eq ! ( OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT , 30_000 ) ;
743+ assert_eq ! ( OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT . as_millis ( ) , 30_000 ) ;
744744 assert_eq ! ( OTEL_BLRP_MAX_QUEUE_SIZE , "OTEL_BLRP_MAX_QUEUE_SIZE" ) ;
745745 assert_eq ! ( OTEL_BLRP_MAX_QUEUE_SIZE_DEFAULT , 2_048 ) ;
746746 assert_eq ! (
@@ -765,10 +765,7 @@ mod tests {
765765
766766 assert_eq ! ( config. scheduled_delay, OTEL_BLRP_SCHEDULE_DELAY_DEFAULT ) ;
767767 #[ cfg( feature = "experimental_logs_batch_log_processor_with_async_runtime" ) ]
768- assert_eq ! (
769- config. max_export_timeout,
770- Duration :: from_millis( OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT )
771- ) ;
768+ assert_eq ! ( config. max_export_timeout, OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT ) ;
772769 assert_eq ! ( config. max_queue_size, OTEL_BLRP_MAX_QUEUE_SIZE_DEFAULT ) ;
773770 assert_eq ! (
774771 config. max_export_batch_size,
@@ -808,10 +805,7 @@ mod tests {
808805 assert_eq ! ( config. max_export_batch_size, 256 ) ;
809806 assert_eq ! ( config. scheduled_delay, OTEL_BLRP_SCHEDULE_DELAY_DEFAULT ) ;
810807 #[ cfg( feature = "experimental_logs_batch_log_processor_with_async_runtime" ) ]
811- assert_eq ! (
812- config. max_export_timeout,
813- Duration :: from_millis( OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT )
814- ) ;
808+ assert_eq ! ( config. max_export_timeout, OTEL_BLRP_EXPORT_TIMEOUT_DEFAULT ) ;
815809 }
816810
817811 #[ test]
0 commit comments