Add affected users to sentry
This commit is contained in:
parent
0176b38958
commit
71e1571c39
@ -5,6 +5,7 @@
|
|||||||
use App\Models\InstanceSettings;
|
use App\Models\InstanceSettings;
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Sentry\Laravel\Integration;
|
use Sentry\Laravel\Integration;
|
||||||
|
use Sentry\State\Scope;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
@ -48,6 +49,11 @@ public function register(): void
|
|||||||
if ($this->settings->do_not_track || isDev()) {
|
if ($this->settings->do_not_track || isDev()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
app('sentry')->configureScope(
|
||||||
|
function (Scope $scope){
|
||||||
|
$scope->setUser(['id'=> config('sentry.server_name')]);
|
||||||
|
}
|
||||||
|
);
|
||||||
Integration::captureUnhandledException($e);
|
Integration::captureUnhandledException($e);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"version": "3.12.36"
|
"version": "3.12.36"
|
||||||
},
|
},
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.21"
|
"version": "4.0.0-beta.22"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user