pull/70/head
saeid 4 years ago
parent f00eeb3241
commit c9c3507950

@ -36,6 +36,10 @@ class Handler extends ExceptionHandler
*/
public function report(Throwable $exception)
{
if (app()->bound('sentry') && $this->shouldReport($exception)) {
app('sentry')->captureException($exception);
}
parent::report($exception);
}

@ -16,6 +16,7 @@
"laravel/tinker": "^2.0",
"maatwebsite/excel": "^3.1",
"nestedset/willaarts": "^5.0.7",
"sentry/sentry-laravel": "^2.3",
"spatie/laravel-medialibrary": "^8.0.0",
"wm/blog": "dev-master",
"wm/common": "dev-master",
@ -76,7 +77,7 @@
"@php artisan key:generate --ansi"
]
},
"repositories": [
{
"type": "vcs",

@ -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/platforms/php/configuration/options/#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…
Cancel
Save