Skip to content

Commit 79cf020

Browse files
committed
ajout et configuration de sentry
1 parent 53bbd15 commit 79cf020

File tree

5 files changed

+1302
-85
lines changed

5 files changed

+1302
-85
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,5 @@ MIX_TORCHLIGHT_TOKEN="${TORCHLIGHT_TOKEN}"
7171
UNSPLASH_ACCESS_KEY=
7272
TELEGRAM_BOT_TOKEN=
7373
MEDIA_DISK=media
74+
SENTRY_LARAVEL_DSN=
75+
SENTRY_TRACES_SAMPLE_RATE=

app/Exceptions/Handler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ class Handler extends ExceptionHandler
3535
public function register()
3636
{
3737
$this->reportable(function (Throwable $e) {
38-
//
38+
if ($this->shouldReport($e) && app()->bound('sentry')) {
39+
app('sentry')->captureException($e);
40+
}
3941
});
4042
}
4143
}

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"livewire/livewire": "^2.5",
2929
"ph7jack/wireui": "^0.14.0",
3030
"ramsey/uuid": "^4.2",
31+
"sentry/sentry-laravel": "^2.10",
3132
"spatie/laravel-feed": "^4.0",
3233
"spatie/laravel-medialibrary-pro": "^1.0.0",
3334
"spatie/laravel-permission": "^5.1",

0 commit comments

Comments
 (0)