Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion classes/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,17 @@ class helper {
public static function init(\core\event\base $event) {
$dns = get_config('tool_sentry', 'dns');
if ($dns) {
\Sentry\init(['dsn' => $dns]);
\Sentry\init([
'dsn' => $dns,
'error_types' => E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR, // Only capture fatal errors
'before_send' => function (Sentry\Event $event) {
if ($event->getLevel() === \Sentry\Severity::warning()) {
// Return null to discard the event
return null;
}
return $event;
},
]);
}
}

Expand Down