-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
579 additions
and
43 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php | ||
index 17b4866..d1dcc9e 100644 | ||
--- a/app/Http/Kernel.php | ||
+++ b/app/Http/Kernel.php | ||
@@ -67,4 +67,16 @@ class Kernel extends HttpKernel | ||
'hanMidEx' => \App\Http\Middleware\HandledMiddlewareEx::class, | ||
'hanMidErr' => \App\Http\Middleware\HandledMiddlewareErr::class, | ||
]; | ||
+ | ||
+ protected function bootstrappers() | ||
+ { | ||
+ if (!getenv('BUGSNAG_REGISTER_OOM_BOOTSTRAPPER')) { | ||
+ return parent::bootstrappers(); | ||
+ } | ||
+ | ||
+ return array_merge( | ||
+ [\Bugsnag\BugsnagLaravel\OomBootstrapper::class], | ||
+ parent::bootstrappers(), | ||
+ ); | ||
+ } | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Feature: Discard classes | ||
|
||
Scenario: Exceptions can be discarded by name | ||
Given I set environment variable "BUGSNAG_DISCARD_CLASSES" to "Exception" | ||
And I start the laravel fixture | ||
When I navigate to the route "/unhandled_controller_exception" | ||
Then I should receive no requests | ||
|
||
Scenario: Exceptions can be discarded by regex | ||
Given I set environment variable "BUGSNAG_DISCARD_CLASSES" to "/Exception$/" | ||
And I start the laravel fixture | ||
When I navigate to the route "/unhandled_controller_exception" | ||
Then I should receive no requests | ||
|
||
Scenario: Exceptions will be delivered when discard classes does not match | ||
Given I set environment variable "BUGSNAG_DISCARD_CLASSES" to "DifferentException,/^NotThatException$/" | ||
And I start the laravel fixture | ||
When I navigate to the route "/unhandled_controller_exception" | ||
Then I wait to receive a request | ||
And the request is valid for the error reporting API version "4.0" for the "Bugsnag Laravel" notifier | ||
And the exception "errorClass" equals "Exception" | ||
And the exception "message" starts with "Crashing exception!" | ||
And the event "metaData.request.httpMethod" equals "GET" | ||
And the event "app.type" equals "HTTP" | ||
And the event "context" equals "GET /unhandled_controller_exception" | ||
And the event "severity" equals "error" | ||
And the event "unhandled" is true | ||
And the event "severityReason.type" equals "unhandledExceptionMiddleware" | ||
And the event "severityReason.attributes.framework" equals "Laravel" |
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
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
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
Oops, something went wrong.