-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from silinternational/release/4.5.0
Release 4.5.0
- Loading branch information
Showing
6 changed files
with
2,038 additions
and
851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
### Added | ||
- | ||
|
||
### Changed | ||
- | ||
|
||
### Deprecated | ||
- | ||
|
||
### Removed | ||
- | ||
|
||
### Fixed | ||
- | ||
|
||
### Security | ||
- | ||
|
||
--- | ||
|
||
### Feature PR Checklist | ||
- [ ] Documentation (README, etc.) | ||
- [ ] Unit tests created or updated | ||
- [ ] Run `make composershow` | ||
|
||
### Release PR Checklist | ||
- [ ] Update version number in main.php Sentry configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<?php | ||
|
||
use notamedia\sentry\SentryTarget; | ||
use Sentry\Event; | ||
use Sil\Idp\IdSync\common\components\IdBrokerBase; | ||
use Sil\Idp\IdSync\common\components\IdStoreBase; | ||
use Sil\Idp\IdSync\common\components\notify\EmailServiceNotifier; | ||
use Sil\Idp\IdSync\common\components\notify\NullNotifier; | ||
use Sil\JsonLog\target\EmailServiceTarget; | ||
use Sil\JsonLog\target\JsonStreamTarget; | ||
use Sil\PhpEnv\Env; | ||
use yii\helpers\ArrayHelper; | ||
use yii\helpers\Json; | ||
|
||
$alertsEmail = Env::get('ALERTS_EMAIL'); | ||
$appEnv = Env::get('APP_ENV', 'prod'); // Have default match "application/frontend/web/index.php". | ||
$idpName = Env::requireEnv('IDP_NAME'); | ||
$idpDisplayName = Env::get('IDP_DISPLAY_NAME', $idpName); | ||
|
||
|
@@ -106,20 +106,38 @@ | |
'logVars' => [], // Disable logging of _SERVER, _POST, etc. | ||
'message' => [ | ||
'to' => $alertsEmail ?? '(disabled)', | ||
'subject' => 'ERROR - ' . $idpName . ' ID Sync [' . $appEnv .']', | ||
'subject' => 'ERROR - ' . $idpName . ' ID Sync [' . YII_ENV .']', | ||
], | ||
'baseUrl' => $emailServiceConfig['baseUrl'], | ||
'accessToken' => $emailServiceConfig['accessToken'], | ||
'assertValidIp' => $emailServiceConfig['assertValidIp'], | ||
'validIpRanges' => $emailServiceConfig['validIpRanges'], | ||
'prefix' => function ($message) use ($appEnv, $idpName) { | ||
'prefix' => function ($message) use ($idpName) { | ||
return Json::encode([ | ||
'app_env' => $appEnv, | ||
'app_env' => YII_ENV, | ||
'idp_name' => $idpName, | ||
]); | ||
}, | ||
'exportInterval' => 1, | ||
], | ||
[ | ||
'class' => SentryTarget::class, | ||
'enabled' => !empty(Env::get('SENTRY_DSN')), | ||
'dsn' => Env::get('SENTRY_DSN'), | ||
'levels' => ['error'], | ||
'context' => true, | ||
// Additional options for `Sentry\init` | ||
// https://docs.sentry.io/platforms/php/configuration/options | ||
'clientOptions' => [ | ||
'attach_stacktrace' => false, // stack trace identifies the logger call stack, not helpful | ||
'environment' => YII_ENV, | ||
'release' => '[email protected]', | ||
'before_send' => function (Event $event) use ($idpName): ?Event { | ||
$event->setExtra(['idp' => $idpName]); | ||
return $event; | ||
}, | ||
], | ||
], | ||
], | ||
], | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.