feat: sentry add email for better support

This commit is contained in:
Andras Bacsai
2023-09-15 21:13:50 +02:00
parent a7b7d3fa32
commit f77df5b732
4 changed files with 6 additions and 6 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Exceptions;
use App\Models\InstanceSettings;
use App\Models\User;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Sentry\Laravel\Integration;
use Sentry\State\Scope;
@@ -56,8 +57,8 @@ class Handler extends ExceptionHandler
function (Scope $scope) {
$scope->setUser(
[
'id' => config('sentry.server_name'),
'email' => auth()->user()->email
'email' => auth()->user()->email,
'instanceAdmin' => User::find(0)->email
]
);
}