File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
opentelemetry-sdk/src/logs Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use crate::Resource;
66use opentelemetry:: logs:: Severity ;
77use opentelemetry:: InstrumentationScope ;
88use std:: fmt:: Debug ;
9+ use std:: time;
910
1011/// A batch of log records to be exported by a `LogExporter`.
1112///
@@ -134,11 +135,14 @@ pub trait LogExporter: Send + Sync + Debug {
134135 & self ,
135136 batch : LogBatch < ' _ > ,
136137 ) -> impl std:: future:: Future < Output = OTelSdkResult > + Send ;
137-
138138 /// Shuts down the exporter.
139- fn shutdown ( & self ) -> OTelSdkResult {
139+ fn shutdown_with_timeout ( & self , _timeout : time :: Duration ) -> OTelSdkResult {
140140 Ok ( ( ) )
141141 }
142+ /// Shuts down the exporter with a default timeout.
143+ fn shutdown ( & self ) -> OTelSdkResult {
144+ self . shutdown_with_timeout ( time:: Duration :: from_secs ( 5 ) )
145+ }
142146 #[ cfg( feature = "spec_unstable_logs_enabled" ) ]
143147 /// Check if logs are enabled.
144148 fn event_enabled ( & self , _level : Severity , _target : & str , _name : Option < & str > ) -> bool {
You can’t perform that action at this time.
0 commit comments