File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
opentelemetry-otlp/src/exporter/tonic Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,11 @@ impl LogExporter for TonicLogsClient {
118
118
. await
119
119
}
120
120
121
- fn shutdown_with_timeout ( & self , _timeout : time:: Duration ) -> OTelSdkResult {
122
- // TODO: Implement actual shutdown
123
- // Due to the use of tokio::sync::Mutex to guard
124
- // the inner client, we need to await the call to lock the mutex
125
- // and that requires async runtime.
126
- // It is possible to fix this by using
127
- // a dedicated thread just to handle shutdown.
128
- // But for now, we just return Ok.
129
- Ok ( ( ) )
121
+ fn shutdown ( & mut self ) -> OTelSdkResult {
122
+ match self . inner . take ( ) {
123
+ Some ( _) => Ok ( ( ) ) , // Successfully took `inner`, indicating a successful shutdown.
124
+ None => Err ( OTelSdkError :: AlreadyShutdown ) , // `inner` was already `None`, meaning it's already shut down.
125
+ }
130
126
}
131
127
132
128
fn set_resource ( & mut self , resource : & opentelemetry_sdk:: Resource ) {
You can’t perform that action at this time.
0 commit comments