@@ -11,7 +11,7 @@ use std::{
1111use opentelemetry:: { otel_debug, otel_error, otel_info, otel_warn} ;
1212
1313use crate :: {
14- error:: { ShutdownError , ShutdownResult } ,
14+ error:: { OTelSdkError , ShutdownResult } ,
1515 metrics:: { exporter:: PushMetricExporter , reader:: SdkProducer , MetricError , MetricResult } ,
1616 Resource ,
1717} ;
@@ -479,22 +479,22 @@ impl PeriodicReaderInner {
479479 let ( response_tx, response_rx) = mpsc:: channel ( ) ;
480480 self . message_sender
481481 . send ( Message :: Shutdown ( response_tx) )
482- . map_err ( |e| ShutdownError :: InternalFailure ( e. to_string ( ) ) ) ?;
482+ . map_err ( |e| OTelSdkError :: InternalFailure ( e. to_string ( ) ) ) ?;
483483
484484 // TODO: Make this timeout configurable.
485485 match response_rx. recv_timeout ( Duration :: from_secs ( 5 ) ) {
486486 Ok ( response) => {
487487 if response {
488488 Ok ( ( ) )
489489 } else {
490- Err ( ShutdownError :: InternalFailure ( "Failed to shutdown" . into ( ) ) )
490+ Err ( OTelSdkError :: InternalFailure ( "Failed to shutdown" . into ( ) ) )
491491 }
492492 }
493493 Err ( mpsc:: RecvTimeoutError :: Timeout ) => {
494- Err ( ShutdownError :: Timeout ( Duration :: from_secs ( 5 ) ) )
494+ Err ( OTelSdkError :: Timeout ( Duration :: from_secs ( 5 ) ) )
495495 }
496496 Err ( mpsc:: RecvTimeoutError :: Disconnected ) => {
497- Err ( ShutdownError :: InternalFailure ( "Failed to shutdown" . into ( ) ) )
497+ Err ( OTelSdkError :: InternalFailure ( "Failed to shutdown" . into ( ) ) )
498498 }
499499 }
500500 }
@@ -543,7 +543,7 @@ impl MetricReader for PeriodicReader {
543543mod tests {
544544 use super :: PeriodicReader ;
545545 use crate :: {
546- error:: { ShutdownError , ShutdownResult } ,
546+ error:: { OTelSdkError , ShutdownResult } ,
547547 metrics:: {
548548 data:: ResourceMetrics , exporter:: PushMetricExporter , reader:: MetricReader ,
549549 InMemoryMetricExporter , MetricError , MetricResult , SdkMeterProvider , Temporality ,
@@ -675,12 +675,12 @@ mod tests {
675675 // calling shutdown again should return Err
676676 let result = meter_provider. shutdown ( ) ;
677677 assert ! ( result. is_err( ) ) ;
678- assert ! ( matches!( result, Err ( ShutdownError :: AlreadyShutdown ) ) ) ;
678+ assert ! ( matches!( result, Err ( OTelSdkError :: AlreadyShutdown ) ) ) ;
679679
680680 // calling shutdown again should return Err
681681 let result = meter_provider. shutdown ( ) ;
682682 assert ! ( result. is_err( ) ) ;
683- assert ! ( matches!( result, Err ( ShutdownError :: AlreadyShutdown ) ) ) ;
683+ assert ! ( matches!( result, Err ( OTelSdkError :: AlreadyShutdown ) ) ) ;
684684 }
685685
686686 #[ test]
0 commit comments