-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to instrument when exceptions happen
Occasionally, the instrumented code will raise an exception, and we would still want the subscribers to be notified. For example, if an HTTP client fails by raising an exception, a subscriber doing logging should still be able to log the failed request. ``` instrument("example.request") do client.post("http://url.that.fails.example/") end ``` This will call the subscriber with an event that contains the exception within the payload under a key `:exception`. This implementation also re-raises the original error, so the callstack is unchanged.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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