File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1414- For Delta Temporality, exporters are not invoked unless there were new
1515 measurements since the last collect/export.
1616 [ #2153 ] ( https://github.com/open-telemetry/opentelemetry-rust/pull/2153 )
17+ - ` MeterProvider ` modified to not invoke shutdown on ` Drop ` , if user has already
18+ called ` shutdown() ` .
19+ [ #2156 ] ( https://github.com/open-telemetry/opentelemetry-rust/pull/2156 )
1720
1821## v0.25.0
1922
Original file line number Diff line number Diff line change @@ -130,8 +130,12 @@ impl SdkMeterProviderInner {
130130
131131impl Drop for SdkMeterProviderInner {
132132 fn drop ( & mut self ) {
133- if let Err ( err) = self . shutdown ( ) {
134- global:: handle_error ( err) ;
133+ // If user has already shutdown the provider manually by calling
134+ // shutdown(), then we don't need to call shutdown again.
135+ if !self . is_shutdown . load ( Ordering :: Relaxed ) {
136+ if let Err ( err) = self . shutdown ( ) {
137+ global:: handle_error ( err) ;
138+ }
135139 }
136140 }
137141}
You can’t perform that action at this time.
0 commit comments