Fix OBI being blocked on shutdown#1782
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1782 +/- ##
===========================================
+ Coverage 45.06% 60.20% +15.13%
===========================================
Files 339 339
Lines 37481 37489 +8
===========================================
+ Hits 16892 22571 +5679
+ Misses 19518 13749 -5769
- Partials 1071 1169 +98
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
grcevski
approved these changes
Apr 9, 2026
grcevski
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Nice! I was seeing these a lot on my new hardware.
833fc94 to
e09bbdf
Compare
e09bbdf to
289eae2
Compare
…nstrumentation into dont-block-exit
…nstrumentation into dont-block-exit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OBI is taking long to exit, mainly because the OpenTelemetry metrics exporters got blocked during their Shutdown. This PR takes a best-effort approach to OTEL metrics shutdown: we try to shut it down in a background goroutine, as it is not a critical operation (the worst case is that we loose few last data points in an OBI instance we are anyway shutting down).
The approach that was taken to fix it in the integration tests was to wrap the OBI process into a shell script, but that was hiding the blocking in production, and its real cause.
It also broke the coverage reporting of the integration tests, as the OBI process was killed before it had time to exit.
This should also fix this issue: #781
Validation