-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Ensure MeterListener.RecordObservableInstruments invoking all instruments callbacks #56183
Ensure MeterListener.RecordObservableInstruments invoking all instruments callbacks #56183
Conversation
Tagging subscribers to this area: @tommcdon, @krwq Issue DetailsWhen having a MeterListener listening to multiple observable instruments and this listener is calling back all listening to instruments to collect instrumentation data; if one of the callbacks throw exception, we used to let this exception propagate. The remaining instruments callbacks will not get a chance to execute. This change is catching any exception thrown from the instrument callbacks and continue executing calling the remaining instruments. At the end of the operation, we'll throw AggregationException containing the list of all exceptions thrown during the operation.
|
@noahfalk @cijothomas could you please have a look? |
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.
LGTM! Once it is merged I can also confirm the errors are reported reasonably in dotnet-counters
cc @hoyosjs
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.
LGTM.
Added a small suggestion for an additional test case
…ents callbacks even some of them throw exception
573946b
to
1100b8d
Compare
The CI failure is unrelated and tracked with the issue #56190 |
When having a MeterListener listening to multiple observable instruments and this listener is calling back all listening to instruments to collect instrumentation data; if one of the callbacks throw exception, we used to let this exception propagate. The remaining instruments callbacks will not get a chance to execute. This change is catching any exception thrown from the instrument callbacks and continue executing calling the remaining instruments. At the end of the operation, we'll throw AggregationException containing the list of all exceptions thrown during the operation.