Добавлен проброс версии приложения в конфиг Raven

This commit is contained in:
ErickSkrauch 2016-12-07 23:51:01 +03:00
parent 8570cfcbfa
commit c99d5c6b1c
3 changed files with 21 additions and 2 deletions

View File

@ -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 {
}

View File

@ -0,0 +1,18 @@
<?php
namespace common\components\Sentry;
use Yii;
class Component extends \mito\sentry\Component {
public $jsNotifier = false;
public function init() {
if (is_array($this->client) && !isset($this->client['release'])) {
$this->client['release'] = Yii::$app->version;
}
parent::init();
}
}

View File

@ -1,5 +1,6 @@
<?php
return [
'version' => '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',
],