Implemented deploy stage, allow to manually specify the environment for the Sentry

This commit is contained in:
ErickSkrauch
2020-06-10 18:15:19 +03:00
parent 39d7cad8b5
commit 053e591c3b
2 changed files with 81 additions and 1 deletions

View File

@@ -65,7 +65,13 @@ return [
'class' => common\components\Sentry::class,
'enabled' => !empty(getenv('SENTRY_DSN')),
'dsn' => getenv('SENTRY_DSN'),
'environment' => YII_ENV_DEV ? 'development' : 'production',
'environment' => (function(): string {
if (!empty(getenv('SENTRY_ENV'))) {
return getenv('SENTRY_ENV');
}
return YII_ENV_DEV ? 'Development' : 'Production';
})(),
'client' => [
'curl_method' => 'async',
],