Skip to content

Commit

Permalink
Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Aug 30, 2023
1 parent f5601b0 commit 1ae8a2e
Show file tree
Hide file tree
Showing 4 changed files with 1,241 additions and 155 deletions.
7 changes: 6 additions & 1 deletion app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Illuminate\Session\TokenMismatchException;
use Illuminate\Validation\ValidationException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Throwable;

class Handler extends ExceptionHandler
{
Expand Down Expand Up @@ -44,6 +45,10 @@ class Handler extends ExceptionHandler
*/
public function register()
{
//
$this->reportable(function (Throwable $e) {
if (app()->bound('sentry')) {
app('sentry')->captureException($e);
}
});
}
}
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"ohdearapp/ohdear-php-sdk": "^3.4",
"predis/predis": "^2.0",
"ramsey/uuid": "^4.3",
"sentry/sentry-laravel": "^3.4",
"spatie/laravel-feed": "^4.1",
"spatie/laravel-ignition": "^1.1",
"spatie/laravel-robots-middleware": "^1.3",
Expand Down Expand Up @@ -98,7 +99,8 @@
"optimize-autoloader": true,
"allow-plugins": {
"composer/package-versions-deprecated": true,
"pestphp/pest-plugin": true
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
Expand Down
Loading

0 comments on commit 1ae8a2e

Please sign in to comment.