25 lines
469 B
PHP
Raw Permalink Normal View History

2022-10-19 01:29:40 +03:00
<?php
namespace App\Exceptions\Trackers;
use App\Traits\Trackers as Base;
2022-10-19 01:29:40 +03:00
use Throwable;
class Bugsnag
{
use Base;
2022-10-19 01:29:40 +03:00
public static function beforeSend(Throwable $e): void
{
app('bugsnag')->setAppVersion(version('short'));
2022-11-22 15:00:33 +03:00
$tags = static::getTrackerTags();
app('bugsnag')->registerCallback(function ($report) use($tags) {
2022-10-19 01:29:40 +03:00
$report->setMetaData([
'akaunting' => $tags
2022-10-19 01:29:40 +03:00
]);
});
}
}