{"action":"created","comment":{"url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/comments/91889459","pull_request_review_id":12397839,"id":91889459,"diff_hunk":"@@ -13,11 +14,33 @@ class NewRelicExceptionHandler implements ExceptionHandler\n {\n \n     /**\n+     * @var array list of class names of exceptions that should not be reported to New Relic. Defaults to the\n+     *            NotFoundHttpException class used for 404 requests.\n+     */\n+    protected $ignoredExceptions = [\n+        NotFoundHttpException::class,\n+    ];\n+\n+\n+    /**\n+     * NewRelicExceptionHandler constructor.\n+     *\n+     * @param array $ignoredExceptions (optional)\n+     */\n+    public function __construct(array $ignoredExceptions = [])\n+    {\n+        if (!empty($ignoredExceptions)) {\n+            $this->ignoredExceptions = $ignoredExceptions;\n+        }\n+    }\n+\n+\n+    /**\n      * @inheritdoc\n      */\n     public function report(Exception $e)\n     {\n-        if (extension_loaded('newrelic')) {\n+        if (extension_loaded('newrelic') && in_array(get_class($e), $this->ignoredExceptions)) {","path":"src/NewRelicExceptionHandler.php","position":39,"original_position":39,"commit_id":"2e46f1de867150266b246d97304147f3b95051d0","original_commit_id":"2e46f1de867150266b246d97304147f3b95051d0","user":{"login":"kryysler","id":3352265,"avatar_url":"https://avatars.githubusercontent.com/u/3352265?v=3","gravatar_id":"","url":"https://api.github.com/users/kryysler","html_url":"https://github.com/kryysler","followers_url":"https://api.github.com/users/kryysler/followers","following_url":"https://api.github.com/users/kryysler/following{/other_user}","gists_url":"https://api.github.com/users/kryysler/gists{/gist_id}","starred_url":"https://api.github.com/users/kryysler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kryysler/subscriptions","organizations_url":"https://api.github.com/users/kryysler/orgs","repos_url":"https://api.github.com/users/kryysler/repos","events_url":"https://api.github.com/users/kryysler/events{/privacy}","received_events_url":"https://api.github.com/users/kryysler/received_events","type":"User","site_admin":false},"body":"Shouldn't it be the other way around, e.g. \"not in array\"?","created_at":"2016-12-12T06:39:45Z","updated_at":"2016-12-12T06:39:46Z","html_url":"https://github.com/nordsoftware/lumen-newrelic/pull/2#discussion_r91889459","pull_request_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/comments/91889459"},"html":{"href":"https://github.com/nordsoftware/lumen-newrelic/pull/2#discussion_r91889459"},"pull_request":{"href":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/2","id":97436870,"html_url":"https://github.com/nordsoftware/lumen-newrelic/pull/2","diff_url":"https://github.com/nordsoftware/lumen-newrelic/pull/2.diff","patch_url":"https://github.com/nordsoftware/lumen-newrelic/pull/2.patch","issue_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues/2","number":2,"state":"open","locked":false,"title":"Ignore NotFoundHttpExceptions by default, make the list of ignored","user":{"login":"Jalle19","id":1106133,"avatar_url":"https://avatars.githubusercontent.com/u/1106133?v=3","gravatar_id":"","url":"https://api.github.com/users/Jalle19","html_url":"https://github.com/Jalle19","followers_url":"https://api.github.com/users/Jalle19/followers","following_url":"https://api.github.com/users/Jalle19/following{/other_user}","gists_url":"https://api.github.com/users/Jalle19/gists{/gist_id}","starred_url":"https://api.github.com/users/Jalle19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jalle19/subscriptions","organizations_url":"https://api.github.com/users/Jalle19/orgs","repos_url":"https://api.github.com/users/Jalle19/repos","events_url":"https://api.github.com/users/Jalle19/events{/privacy}","received_events_url":"https://api.github.com/users/Jalle19/received_events","type":"User","site_admin":false},"body":"exceptions configurable through the constructor.\r\n\r\n@kryysler does this look okay?","created_at":"2016-12-10T20:27:57Z","updated_at":"2016-12-12T06:39:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d598446133bf31f0cdf0b34badf7ef1e17fca95","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/2/commits","review_comments_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/2/comments","review_comment_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues/2/comments","statuses_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/statuses/2e46f1de867150266b246d97304147f3b95051d0","head":{"label":"nordsoftware:ignored-exceptions","ref":"ignored-exceptions","sha":"2e46f1de867150266b246d97304147f3b95051d0","user":{"login":"nordsoftware","id":2654995,"avatar_url":"https://avatars.githubusercontent.com/u/2654995?v=3","gravatar_id":"","url":"https://api.github.com/users/nordsoftware","html_url":"https://github.com/nordsoftware","followers_url":"https://api.github.com/users/nordsoftware/followers","following_url":"https://api.github.com/users/nordsoftware/following{/other_user}","gists_url":"https://api.github.com/users/nordsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/nordsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nordsoftware/subscriptions","organizations_url":"https://api.github.com/users/nordsoftware/orgs","repos_url":"https://api.github.com/users/nordsoftware/repos","events_url":"https://api.github.com/users/nordsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/nordsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":75941766,"name":"lumen-newrelic","full_name":"nordsoftware/lumen-newrelic","owner":{"login":"nordsoftware","id":2654995,"avatar_url":"https://avatars.githubusercontent.com/u/2654995?v=3","gravatar_id":"","url":"https://api.github.com/users/nordsoftware","html_url":"https://github.com/nordsoftware","followers_url":"https://api.github.com/users/nordsoftware/followers","following_url":"https://api.github.com/users/nordsoftware/following{/other_user}","gists_url":"https://api.github.com/users/nordsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/nordsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nordsoftware/subscriptions","organizations_url":"https://api.github.com/users/nordsoftware/orgs","repos_url":"https://api.github.com/users/nordsoftware/repos","events_url":"https://api.github.com/users/nordsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/nordsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nordsoftware/lumen-newrelic","description":"New Relic instrumentation for the Lumen framework","fork":false,"url":"https://api.github.com/repos/nordsoftware/lumen-newrelic","forks_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/forks","keys_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/teams","hooks_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/hooks","issue_events_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues/events{/number}","events_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/events","assignees_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/assignees{/user}","branches_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/branches{/branch}","tags_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/tags","blobs_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/refs{/sha}","trees_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/statuses/{sha}","languages_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/languages","stargazers_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/stargazers","contributors_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/contributors","subscribers_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/subscribers","subscription_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/subscription","commits_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/commits{/sha}","git_commits_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/commits{/sha}","comments_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/comments{/number}","issue_comment_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues/comments{/number}","contents_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/contents/{+path}","compare_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/merges","archive_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/downloads","issues_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues{/number}","pulls_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls{/number}","milestones_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/milestones{/number}","notifications_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/labels{/name}","releases_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/releases{/id}","deployments_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/deployments","created_at":"2016-12-08T13:49:32Z","updated_at":"2016-12-09T14:49:58Z","pushed_at":"2016-12-10T20:27:57Z","git_url":"git://github.com/nordsoftware/lumen-newrelic.git","ssh_url":"git@github.com:nordsoftware/lumen-newrelic.git","clone_url":"https://github.com/nordsoftware/lumen-newrelic.git","svn_url":"https://github.com/nordsoftware/lumen-newrelic","homepage":null,"size":63,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"nordsoftware:master","ref":"master","sha":"831bc6d2bd9fcb46d5ab17267a84f283c8071fb7","user":{"login":"nordsoftware","id":2654995,"avatar_url":"https://avatars.githubusercontent.com/u/2654995?v=3","gravatar_id":"","url":"https://api.github.com/users/nordsoftware","html_url":"https://github.com/nordsoftware","followers_url":"https://api.github.com/users/nordsoftware/followers","following_url":"https://api.github.com/users/nordsoftware/following{/other_user}","gists_url":"https://api.github.com/users/nordsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/nordsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nordsoftware/subscriptions","organizations_url":"https://api.github.com/users/nordsoftware/orgs","repos_url":"https://api.github.com/users/nordsoftware/repos","events_url":"https://api.github.com/users/nordsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/nordsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":75941766,"name":"lumen-newrelic","full_name":"nordsoftware/lumen-newrelic","owner":{"login":"nordsoftware","id":2654995,"avatar_url":"https://avatars.githubusercontent.com/u/2654995?v=3","gravatar_id":"","url":"https://api.github.com/users/nordsoftware","html_url":"https://github.com/nordsoftware","followers_url":"https://api.github.com/users/nordsoftware/followers","following_url":"https://api.github.com/users/nordsoftware/following{/other_user}","gists_url":"https://api.github.com/users/nordsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/nordsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nordsoftware/subscriptions","organizations_url":"https://api.github.com/users/nordsoftware/orgs","repos_url":"https://api.github.com/users/nordsoftware/repos","events_url":"https://api.github.com/users/nordsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/nordsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nordsoftware/lumen-newrelic","description":"New Relic instrumentation for the Lumen framework","fork":false,"url":"https://api.github.com/repos/nordsoftware/lumen-newrelic","forks_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/forks","keys_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/teams","hooks_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/hooks","issue_events_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues/events{/number}","events_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/events","assignees_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/assignees{/user}","branches_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/branches{/branch}","tags_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/tags","blobs_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/refs{/sha}","trees_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/statuses/{sha}","languages_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/languages","stargazers_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/stargazers","contributors_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/contributors","subscribers_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/subscribers","subscription_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/subscription","commits_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/commits{/sha}","git_commits_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/git/commits{/sha}","comments_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/comments{/number}","issue_comment_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues/comments{/number}","contents_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/contents/{+path}","compare_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/merges","archive_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/downloads","issues_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues{/number}","pulls_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls{/number}","milestones_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/milestones{/number}","notifications_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/labels{/name}","releases_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/releases{/id}","deployments_url":"https://api.github.com/repos/nordsoftware/lumen-newrelic/deployments","created_at":"2016-12-08T13:49:32Z","updated_at":"2016-12-09T14:49:58Z","pushed_at":"2016-12-10T20:27:57Z","git_url":"git://github.com/nordsoftware/lumen-newrelic.git","ssh_url":"git@github.com:nordsoftware/lumen-newrelic.git","clone_url":"https://github.com/nordsoftware/lumen-newrelic.git","svn_url":"https://github.com/nordsoftware/lumen-newrelic","homepage":null,"size":63,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/2"},"html":{"href":"https://github.com/nordsoftware/lumen-newrelic/pull/2"},"issue":{"href":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues/2"},"comments":{"href":"https://api.github.com/repos/nordsoftware/lumen-newrelic/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nordsoftware/lumen-newrelic/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/nordsoftware/lumen-newrelic/statuses/2e46f1de867150266b246d97304147f3b95051d0"}}}}
{"actor":{"display_login":"kryysler"}}