-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow multi-instrument callbacks to be unregistered #3522
Conversation
Return a Registration from the method that can be used by the caller to unregister their callback. Update documentation of the method to better explain expectations of use and implementation.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3522 +/- ##
=====================================
Coverage 78.0% 78.0%
=====================================
Files 164 164
Lines 11759 11799 +40
=====================================
+ Hits 9177 9214 +37
- Misses 2387 2389 +2
- Partials 195 196 +1
|
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.
Is there a test showing that the callback isn't called in collects after Unregister()
?
There is one for the global implementation. I'll add one for the SDK implementation. |
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Added in c56c140 |
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.
Cool!
Resolves #3452
Registration
type to the metric API and have theMeter
'sRegisterCallback
method return one.Registration
s.