mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-04-16 12:48:32 +02:00
Add Sentry as a possible error logger
This commit is contained in:
parent
2c050889a7
commit
22f066b5c4
@ -38,6 +38,10 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
public function report(Throwable $exception)
|
||||
{
|
||||
if ($this->shouldReport($exception) && app()->bound('sentry')) {
|
||||
app('sentry')->captureException($exception);
|
||||
}
|
||||
|
||||
parent::report($exception);
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
"league/flysystem-aws-s3-v3": "^1.0",
|
||||
"predis/predis": "^1.1",
|
||||
"rap2hpoutre/laravel-log-viewer": "^1.7",
|
||||
"sentry/sentry-laravel": "^2.3",
|
||||
"shaarli/netscape-bookmark-parser": "^2.1",
|
||||
"spatie/laravel-backup": "^6.11.1",
|
||||
"venturecraft/revisionable": "^1.34"
|
||||
|
1113
composer.lock
generated
1113
composer.lock
generated
File diff suppressed because it is too large
Load Diff
37
config/sentry.php
Normal file
37
config/sentry.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),
|
||||
|
||||
// capture release as git sha
|
||||
// 'release' => trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')),
|
||||
|
||||
// When left empty or `null` the Laravel environment will be used
|
||||
'environment' => env('SENTRY_ENVIRONMENT'),
|
||||
|
||||
'breadcrumbs' => [
|
||||
// Capture Laravel logs in breadcrumbs
|
||||
'logs' => true,
|
||||
|
||||
// Capture SQL queries in breadcrumbs
|
||||
'sql_queries' => true,
|
||||
|
||||
// Capture bindings on SQL queries logged in breadcrumbs
|
||||
'sql_bindings' => true,
|
||||
|
||||
// Capture queue job information in breadcrumbs
|
||||
'queue_info' => true,
|
||||
|
||||
// Capture command information in breadcrumbs
|
||||
'command_info' => true,
|
||||
],
|
||||
|
||||
// @see: https://docs.sentry.io/error-reporting/configuration/?platform=php#send-default-pii
|
||||
'send_default_pii' => false,
|
||||
|
||||
'traces_sample_rate' => (float)(env('SENTRY_TRACES_SAMPLE_RATE', 0.0)),
|
||||
|
||||
'controllers_base_namespace' => env('SENTRY_CONTROLLERS_BASE_NAMESPACE', 'App\\Http\\Controllers'),
|
||||
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user