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 14
14
- For Delta Temporality, exporters are not invoked unless there were new
15
15
measurements since the last collect/export.
16
16
[ #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 )
17
20
18
21
## v0.25.0
19
22
Original file line number Diff line number Diff line change @@ -130,8 +130,12 @@ impl SdkMeterProviderInner {
130
130
131
131
impl Drop for SdkMeterProviderInner {
132
132
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
+ }
135
139
}
136
140
}
137
141
}
You can’t perform that action at this time.
0 commit comments