Skip to content

Commit 34d654f

Browse files
committedMar 5, 2018
Add Sentry
1 parent 2226034 commit 34d654f

File tree

6 files changed

+224
-72
lines changed

6 files changed

+224
-72
lines changed
 

‎.env.local

+1
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ PUSHER_APP_CLUSTER=mt1
3737

3838
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
3939
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
40+
SENTRY_DSN=https://46186c74a86348b29c9e0f15523b019d:2e335a6f0a194edca00c050c1d673310@sentry.io/298764

‎app/Exceptions/Handler.php

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ class Handler extends ExceptionHandler
3636
*/
3737
public function report(Exception $exception)
3838
{
39+
if (app()->bound('sentry') && $this->shouldReport($exception)) {
40+
app('sentry')->captureException($exception);
41+
}
42+
3943
parent::report($exception);
4044
}
4145

‎composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"php": ">=7.1.3",
99
"fideloper/proxy": "~4.0",
1010
"laravel/framework": "5.6.*",
11-
"laravel/tinker": "~1.0"
11+
"laravel/tinker": "~1.0",
12+
"sentry/sentry-laravel": "^0.8.0"
1213
},
1314
"require-dev": {
1415
"filp/whoops": "~2.0",

0 commit comments

Comments
 (0)