Первичная интеграция логирования ошибок в sentry

This commit is contained in:
ErickSkrauch 2016-11-22 01:47:41 +03:00
parent 5de6fa91c8
commit 225f2fd3cf
4 changed files with 26 additions and 1 deletions

View File

@ -21,6 +21,17 @@ return [
'log' => [ 'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0, 'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [ 'targets' => [
[
'class' => mito\sentry\SentryTarget::class,
'levels' => ['error', 'warning'],
'except' => [
'legacy-authserver',
'session',
'yii\web\HttpException:*',
'api\modules\session\exceptions\SessionServerException:*',
'api\modules\authserver\exceptions\AuthserverException:*',
],
],
[ [
'class' => yii\log\FileTarget::class, 'class' => yii\log\FileTarget::class,
'levels' => ['error', 'warning'], 'levels' => ['error', 'warning'],

View File

@ -20,6 +20,15 @@ return [
'class' => yii\swiftmailer\Mailer::class, 'class' => yii\swiftmailer\Mailer::class,
'viewPath' => '@common/mail', 'viewPath' => '@common/mail',
], ],
'sentry' => [
'class' => mito\sentry\SentryComponent::class,
'dsn' => 'https://9f37c63079e24f35b585ab61dd7ee068:b501bfc8d9fc49ccadbf16731705b222@sentry.ely.by/3',
'environment' => YII_ENV_DEV ? 'development' : 'production',
'jsNotifier' => false,
'client' => [
'curl_method' => 'async',
],
],
'security' => [ 'security' => [
'passwordHashStrategy' => 'password_hash', 'passwordHashStrategy' => 'password_hash',
], ],

View File

@ -26,7 +26,8 @@
"emarref/jwt": "~1.0.3", "emarref/jwt": "~1.0.3",
"ely/amqp-controller": "dev-master#d7f8cdbc66c45e477c9c7d5d509bc0c1b11fd3ec", "ely/amqp-controller": "dev-master#d7f8cdbc66c45e477c9c7d5d509bc0c1b11fd3ec",
"ely/email-renderer": "dev-master#38a148cd5081147acc31125ddc49966b149f65cf", "ely/email-renderer": "dev-master#38a148cd5081147acc31125ddc49966b149f65cf",
"predis/predis": "^1.0" "predis/predis": "^1.0",
"mito/yii2-sentry": "dev-1.0.0-dev#193b96880d30e9d3b616652a5abb3c4f28e14f2c"
}, },
"require-dev": { "require-dev": {
"yiisoft/yii2-codeception": "*", "yiisoft/yii2-codeception": "*",

View File

@ -13,6 +13,10 @@ return [
'components' => [ 'components' => [
'log' => [ 'log' => [
'targets' => [ 'targets' => [
[
'class' => mito\sentry\SentryTarget::class,
'levels' => ['error', 'warning'],
],
[ [
'class' => yii\log\FileTarget::class, 'class' => yii\log\FileTarget::class,
'levels' => ['error', 'warning'], 'levels' => ['error', 'warning'],