From c99d5c6b1c053c70d0ebfddd86c4896fb6471d5d Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Wed, 7 Dec 2016 23:51:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BF=D1=80=D0=BE=D0=B1=D1=80=D0=BE=D1=81=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D0=B8=20=D0=BF=D1=80=D0=B8=D0=BB=D0=BE?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=84=D0=B8=D0=B3=20Raven?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autocompletion.php | 1 + common/components/Sentry/Component.php | 18 ++++++++++++++++++ common/config/config.php | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 common/components/Sentry/Component.php diff --git a/autocompletion.php b/autocompletion.php index 1d99674..f91608c 100644 --- a/autocompletion.php +++ b/autocompletion.php @@ -21,6 +21,7 @@ class Yii extends \yii\BaseYii { * @property \common\components\RabbitMQ\Component $amqp * @property \GuzzleHttp\Client $guzzle * @property \common\components\EmailRenderer $emailRenderer + * @property \mito\sentry\Component $sentry */ abstract class BaseApplication extends yii\base\Application { } diff --git a/common/components/Sentry/Component.php b/common/components/Sentry/Component.php new file mode 100644 index 0000000..ce0b1c5 --- /dev/null +++ b/common/components/Sentry/Component.php @@ -0,0 +1,18 @@ +client) && !isset($this->client['release'])) { + $this->client['release'] = Yii::$app->version; + } + + parent::init(); + } + +} diff --git a/common/config/config.php b/common/config/config.php index 2284c57..2819864 100644 --- a/common/config/config.php +++ b/common/config/config.php @@ -1,5 +1,6 @@ '1.1.3-dev', 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', 'components' => [ 'cache' => [ @@ -35,11 +36,10 @@ return [ ], ], 'sentry' => [ - 'class' => mito\sentry\Component::class, + 'class' => common\components\Sentry\Component::class, 'enabled' => !empty(getenv('SENTRY_DSN')), 'dsn' => getenv('SENTRY_DSN'), 'environment' => YII_ENV_DEV ? 'development' : 'production', - 'jsNotifier' => false, 'client' => [ 'curl_method' => 'async', ],