mirror of
https://github.com/elyby/accounts.git
synced 2024-11-30 02:32:26 +05:30
Добавлен проброс версии приложения в конфиг Raven
This commit is contained in:
parent
8570cfcbfa
commit
c99d5c6b1c
@ -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 {
|
||||
}
|
||||
|
18
common/components/Sentry/Component.php
Normal file
18
common/components/Sentry/Component.php
Normal 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();
|
||||
}
|
||||
|
||||
}
|
@ -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',
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user