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 11
11
external sources to be sent through OpenTelemetry.
12
12
[ #2105 ] ( https://github.com/open-telemetry/opentelemetry-rust/pull/2105 )
13
13
- Feature: ` SimpleSpanProcessor::new ` is now public [ #2119 ] ( https://github.com/open-telemetry/opentelemetry-rust/pull/2119 )
14
+ - ` MeterProvider ` modified to not invoke shutdown on ` Drop ` , if user has already
15
+ called ` shutdown() ` .
16
+ [ #2156 ] ( https://github.com/open-telemetry/opentelemetry-rust/pull/2156 )
14
17
15
18
## v0.25.0
16
19
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