improved error tracking
This commit is contained in:
23
app/Exceptions/Trackers/Bugsnag.php
Normal file
23
app/Exceptions/Trackers/Bugsnag.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions\Trackers;
|
||||
|
||||
use Throwable;
|
||||
|
||||
class Bugsnag
|
||||
{
|
||||
public static function beforeSend(Throwable $e): void
|
||||
{
|
||||
app('bugsnag')->setAppVersion(version('short'));
|
||||
|
||||
app('bugsnag')->registerCallback(function ($report) {
|
||||
$report->setMetaData([
|
||||
'akaunting' => [
|
||||
'company_id' => (string) company_id(),
|
||||
'locale' => (string) app()->getLocale(),
|
||||
'timezone' => (string) config('app.timezone'),
|
||||
]
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user