mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 23:01:07 +03:30
feat: add sentry
This commit is contained in:
@@ -1,44 +0,0 @@
|
|||||||
APP_NAME=Laravel
|
|
||||||
APP_ENV=local
|
|
||||||
APP_KEY=
|
|
||||||
APP_DEBUG=true
|
|
||||||
APP_URL=http://localhost
|
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
|
||||||
|
|
||||||
DB_CONNECTION=mysql
|
|
||||||
DB_HOST=127.0.0.1
|
|
||||||
DB_PORT=3306
|
|
||||||
DB_DATABASE=homestead
|
|
||||||
DB_USERNAME=homestead
|
|
||||||
DB_PASSWORD=secret
|
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
|
||||||
CACHE_DRIVER=file
|
|
||||||
QUEUE_CONNECTION=sync
|
|
||||||
SESSION_DRIVER=file
|
|
||||||
SESSION_LIFETIME=120
|
|
||||||
|
|
||||||
REDIS_HOST=127.0.0.1
|
|
||||||
REDIS_PASSWORD=null
|
|
||||||
REDIS_PORT=6379
|
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
|
||||||
MAIL_HOST=smtp.mailtrap.io
|
|
||||||
MAIL_PORT=2525
|
|
||||||
MAIL_USERNAME=null
|
|
||||||
MAIL_PASSWORD=null
|
|
||||||
MAIL_ENCRYPTION=null
|
|
||||||
|
|
||||||
AWS_ACCESS_KEY_ID=
|
|
||||||
AWS_SECRET_ACCESS_KEY=
|
|
||||||
AWS_DEFAULT_REGION=us-east-1
|
|
||||||
AWS_BUCKET=
|
|
||||||
|
|
||||||
PUSHER_APP_ID=
|
|
||||||
PUSHER_APP_KEY=
|
|
||||||
PUSHER_APP_SECRET=
|
|
||||||
PUSHER_APP_CLUSTER=mt1
|
|
||||||
|
|
||||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
|
||||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
|
||||||
@@ -34,6 +34,10 @@ class Handler extends ExceptionHandler
|
|||||||
*/
|
*/
|
||||||
public function report(Exception $exception)
|
public function report(Exception $exception)
|
||||||
{
|
{
|
||||||
|
if (app()->bound('sentry') && $this->shouldReport($exception)) {
|
||||||
|
app('sentry')->captureException($exception);
|
||||||
|
}
|
||||||
|
|
||||||
parent::report($exception);
|
parent::report($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"laravel/passport": "^7.2",
|
"laravel/passport": "^7.2",
|
||||||
"laravel/tinker": "^1.0",
|
"laravel/tinker": "^1.0",
|
||||||
"milon/barcode": "^5.3",
|
"milon/barcode": "^5.3",
|
||||||
|
"sentry/sentry-laravel": "^2.3",
|
||||||
"spatie/laravel-permission": "^2.36"
|
"spatie/laravel-permission": "^2.36"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
Generated
+3694
-889
File diff suppressed because it is too large
Load Diff
@@ -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'),
|
||||||
|
|
||||||
|
];
|
||||||
Reference in New Issue
Block a user