diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php index 84f6e8e67..1336af80b 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php @@ -17,6 +17,7 @@ return [ 'hide_price_categories', 'tcmb_exchange_url', 'enabled_currencies', + 'disable_sentry', ], ], 'ads' => [ diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php index 467bf61e8..af1b774f1 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php @@ -395,31 +395,32 @@ return [ }, ], ], - 'favicon' => [ - 'type' => 'anomaly.field_type.file', - ], - 'ads_date_hidden' => [ - 'type' => 'anomaly.field_type.boolean', - 'config' => [ - 'default_value' => false, - ] - ], - 'hide_listing_header' => [ - 'type' => 'anomaly.field_type.boolean', - 'config' => [ - 'default_value' => false, - ] - ], - 'hide_filter_section' => [ - 'type' => 'anomaly.field_type.boolean', - 'config' => [ - 'default_value' => false, - ] - ], - 'hide_seller_info' => [ - 'type' => 'anomaly.field_type.boolean', - 'config' => [ - 'default_value' => false, - ] - ] + 'favicon' => [ + 'type' => 'anomaly.field_type.file', + ], + 'ads_date_hidden' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + ] + ], + 'hide_listing_header' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + ] + ], + 'hide_filter_section' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + ] + ], + 'hide_seller_info' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + ] + ], + 'disable_sentry' => 'anomaly.field_type.boolean', ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php index 823d2589a..2bf5e9497 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php @@ -247,6 +247,9 @@ return [ 'name' => 'GET Categories', 'instructions' => 'It represents the categories in which the GET property will be valid.' ], + 'disable_sentry' => [ + 'name' => 'Disable Sentry' + ], 'watermark' => [ 'name' => 'Watermark', 'instructions' => 'Is watermark active?' diff --git a/app/Exceptions/ExceptionHandler.php b/app/Exceptions/ExceptionHandler.php index a789a8e71..79492d1b8 100644 --- a/app/Exceptions/ExceptionHandler.php +++ b/app/Exceptions/ExceptionHandler.php @@ -87,7 +87,11 @@ class ExceptionHandler extends Handler public function report(Exception $e) { - if (app()->bound('sentry') && $this->shouldReport($e)) { + if (!setting_value('visiosoft.module.advs::disable_sentry') + && app()->bound('sentry') + && $this->shouldReport($e) + && env('SENTRY_LARAVEL_DSN')) { + app('sentry')->captureException($e); }