{"action":"created","issue":{"url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/477","repository_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby","labels_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/477/labels{/name}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/477/comments","events_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/477/events","html_url":"https://github.com/bugsnag/bugsnag-ruby/pull/477","id":342996262,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNzYzNzM4","number":477,"title":"Do not report SignalExceptions in at_exit handler","user":{"login":"mrnugget","id":1185253,"node_id":"MDQ6VXNlcjExODUyNTM=","avatar_url":"https://avatars3.githubusercontent.com/u/1185253?v=4","gravatar_id":"","url":"https://api.github.com/users/mrnugget","html_url":"https://github.com/mrnugget","followers_url":"https://api.github.com/users/mrnugget/followers","following_url":"https://api.github.com/users/mrnugget/following{/other_user}","gists_url":"https://api.github.com/users/mrnugget/gists{/gist_id}","starred_url":"https://api.github.com/users/mrnugget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrnugget/subscriptions","organizations_url":"https://api.github.com/users/mrnugget/orgs","repos_url":"https://api.github.com/users/mrnugget/repos","events_url":"https://api.github.com/users/mrnugget/events{/privacy}","received_events_url":"https://api.github.com/users/mrnugget/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-20T07:06:33Z","updated_at":"2018-07-23T22:42:37Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/477","html_url":"https://github.com/bugsnag/bugsnag-ruby/pull/477","diff_url":"https://github.com/bugsnag/bugsnag-ruby/pull/477.diff","patch_url":"https://github.com/bugsnag/bugsnag-ruby/pull/477.patch"},"body":"## Goal\r\n\r\nThe previous behaviour resulted in applications reporting errors even though they were gracefully and without any problems shut down. Example: the puma webserver relies on `SIGTERM` to gracefully shut down its workers and Bugsnag reported errors when it was normally shut down.\r\n\r\n\r\nWith the `at_exit` handler introduced in #397, Bugsnag would catch `SignalExceptions` on exit and report them as error, even though they are none. \r\n\r\nThis PR changes the existing behaviour to add `SignalException` as a special case in which the exception should not be passed to `Bugsnag.notify`.\r\n\r\n## Changeset\r\n\r\n\r\n### Added\r\n\r\n- `Bugsnag.at_exit_handler`\r\n\r\n### Changed\r\n\r\n- `Bugsnag.register_at_exit`\r\n\r\n## Tests\r\n\r\nDue to the Ruby exiting when a `SignalException` is raised I had to refactor the code to make the actual handling of the exit-exceptions testable without the test suite quitting.\r\n\r\n### Linked issues\r\n\r\nFor more information on puma's behaviour, see here: https://github.com/puma/puma/issues/1438\r\nHoneybadger also ignores `SignalException`s: https://github.com/honeybadger-io/honeybadger-ruby/issues/267\r\n\r\n## Review\r\n\r\n<!-- When submitting for review, consider the points for self-review and the\r\n     criteria which will be used for secondary review -->\r\n\r\nFor the submitter, initial self-review:\r\n\r\n- [x] Commented on code changes inline explain the reasoning behind the approach\r\n- [x] Reviewed the test cases added for completeness and possible points for discussion\r\n- [ ] A changelog entry was added for the goal of this pull request\r\n- [x] Check the scope of the changeset - is everything in the diff required for the pull request?\r\n- This pull request is ready for:\r\n  - [x] Initial review of the intended approach, not yet feature complete\r\n  - [x] Structural review of the classes, functions, and properties modified\r\n  - [x] Final review\r\n\r\nFor the pull request reviewer(s), this changeset has been reviewed for:\r\n\r\n- [ ] Consistency across platforms for structures or concepts added or modified\r\n- [ ] Consistency between the changeset and the goal stated above\r\n- [ ] Internal consistency with the rest of the library - is there any overlap between existing interfaces and any which have been added?\r\n- [ ] Usage friction - is the proposed change in usage cumbersome or complicated?\r\n- [ ] Performance and complexity - are there any cases of unexpected O(n^3) when iterating, recursing, flat mapping, etc?\r\n- [ ] Concurrency concerns - if components are accessed asynchronously, what issues will arise\r\n- [ ] Thoroughness of added tests and any missing edge cases\r\n- [ ] Idiomatic use of the language\r\n"},"comment":{"url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/comments/407224120","html_url":"https://github.com/bugsnag/bugsnag-ruby/pull/477#issuecomment-407224120","issue_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/477","id":407224120,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzIyNDEyMA==","user":{"login":"soulcutter","id":97257,"node_id":"MDQ6VXNlcjk3MjU3","avatar_url":"https://avatars2.githubusercontent.com/u/97257?v=4","gravatar_id":"","url":"https://api.github.com/users/soulcutter","html_url":"https://github.com/soulcutter","followers_url":"https://api.github.com/users/soulcutter/followers","following_url":"https://api.github.com/users/soulcutter/following{/other_user}","gists_url":"https://api.github.com/users/soulcutter/gists{/gist_id}","starred_url":"https://api.github.com/users/soulcutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soulcutter/subscriptions","organizations_url":"https://api.github.com/users/soulcutter/orgs","repos_url":"https://api.github.com/users/soulcutter/repos","events_url":"https://api.github.com/users/soulcutter/events{/privacy}","received_events_url":"https://api.github.com/users/soulcutter/received_events","type":"User","site_admin":false},"created_at":"2018-07-23T22:42:37Z","updated_at":"2018-07-23T22:42:37Z","author_association":"NONE","body":"![im-a-big-fan](https://user-images.githubusercontent.com/97257/43106759-19d781c6-8ea8-11e8-8053-4e0a656a06a4.jpg)\r\n"}}
{"actor":{"display_login":"soulcutter"}}