Skip to content

Commit

Permalink
Merge pull request #175 from silinternational/sentry
Browse files Browse the repository at this point in the history
Sentry
  • Loading branch information
briskt authored Dec 12, 2024
2 parents b779da0 + f9983c7 commit 3828e81
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 78 deletions.
15 changes: 14 additions & 1 deletion application/common/config/main.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use notamedia\sentry\SentryTarget;
use Sentry\Event;
use Sil\Idp\IdSync\common\components\IdBrokerBase;
use Sil\Idp\IdSync\common\components\IdStoreBase;
Expand All @@ -9,6 +8,7 @@
use Sil\JsonLog\target\EmailServiceTarget;
use Sil\JsonLog\target\JsonStreamTarget;
use Sil\PhpEnv\Env;
use Sil\Sentry\SentryTarget;
use yii\helpers\ArrayHelper;
use yii\helpers\Json;

Expand Down Expand Up @@ -126,7 +126,20 @@
'enabled' => !empty(Env::get('SENTRY_DSN')),
'dsn' => Env::get('SENTRY_DSN'),
'levels' => ['error'],
'except' => [
'yii\web\HttpException:400',
'yii\web\HttpException:401',
'yii\web\HttpException:404',
'yii\web\HttpException:409',
'yii\web\HttpException:422',
'yii\web\HttpException:502',
'Sil\EmailService\Client\EmailServiceClientException',
],
'context' => true,
'tagCallback' => function ($tags) use ($idpName): array {
$tags['idp'] = $idpName;
return $tags;
},
// Additional options for `Sentry\init`
// https://docs.sentry.io/platforms/php/configuration/options
'clientOptions' => [
Expand Down
4 changes: 2 additions & 2 deletions application/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"guzzlehttp/guzzle": "^6.2",
"google/apiclient": "^2.0",
"codemix/yii2-streamlog": "^1.3",
"notamedia/yii2-sentry": "^1.7",
"sentry/sentry": "^3.22"
"sentry/sentry": "^3.22",
"silinternational/yii2-sentry": "^2.0"
},
"require-dev": {
"behat/behat": "^3.3",
Expand Down
138 changes: 69 additions & 69 deletions application/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions application/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@
"name": "monolog/monolog",
"version": "2.9.3"
},
{
"name": "notamedia/yii2-sentry",
"version": "1.7.0"
},
{
"name": "paragonie/constant_time_encoding",
"version": "v3.0.0"
Expand Down Expand Up @@ -195,6 +191,10 @@
"name": "silinternational/yii2-json-log-targets",
"version": "2.1.0"
},
{
"name": "silinternational/yii2-sentry",
"version": "2.0.0"
},
{
"name": "swiftmailer/swiftmailer",
"version": "v6.3.0"
Expand All @@ -205,11 +205,11 @@
},
{
"name": "symfony/http-client",
"version": "v6.4.10"
"version": "v6.4.16"
},
{
"name": "symfony/http-client-contracts",
"version": "v3.5.0"
"version": "v3.5.1"
},
{
"name": "symfony/options-resolver",
Expand Down

0 comments on commit 3828e81

Please sign in to comment.