-
Notifications
You must be signed in to change notification settings - Fork 831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add shutdown / close to OpenTelemetrySdk #5100
Add shutdown / close to OpenTelemetrySdk #5100
Conversation
Codecov ReportBase: 91.05% // Head: 91.06% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #5100 +/- ##
=========================================
Coverage 91.05% 91.06%
+ Complexity 4889 4888 -1
=========================================
Files 553 553
Lines 14467 14468 +1
Branches 1388 1388
=========================================
+ Hits 13173 13175 +2
Misses 896 896
+ Partials 398 397 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -390,6 +375,10 @@ public AutoConfiguredOpenTelemetrySdk build() { | |||
.setPropagators(propagators); | |||
|
|||
openTelemetrySdk = sdkBuilder.build(); | |||
|
|||
if (registerShutdownHook) { | |||
Runtime.getRuntime().addShutdownHook(new Thread(openTelemetrySdk::shutdown)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be close
instead of shutdown
?
Runtime.getRuntime().addShutdownHook(new Thread(openTelemetrySdk::shutdown)); | |
Runtime.getRuntime().addShutdownHook(new Thread(openTelemetrySdk::close)); |
Resolves #5086.