Repository navigation
[SDK] MeterProvider: do not warn in destructor after explicit Shutdown - #4085
Merged
marcalff merged 12 commits intoMay 19, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4085 +/- ##
==========================================
- Coverage 81.99% 81.99% -0.00%
==========================================
Files 385 385
Lines 16023 16025 +2
==========================================
+ Hits 13137 13138 +1
- Misses 2886 2887 +1
🚀 New features to boost your workflow:
|
ThomsonTan
reviewed
May 15, 2026
jaehyeong-cho
force-pushed
the
mp-shutdown-no-warning
branch
from
May 18, 2026 22:47
c533977 to
3417174
Compare
Merged
3 tasks
1 task done
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.
Fixes #3511
Changes
Please provide a brief description of the changes here.
It seems natural for
MeterProviderto shut its context down from the destructor, and sinceMeterContextis a shared object, I think it is meaningful to warn about duplicateShutdowncalls.However, I think it may not be a good experience that any user who calls the public
MeterProvider::ShutdownAPI will always receive a warning log afterwards, because this isn't really a misuse case.Therefore, with this PR, I would like to propose limiting
MeterProviderto invoking the context shutdown at most once, so that no warning is emitted in the normal usage path.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes