Skip to content

Instantly share code, notes, and snippets.

@acidjazz
Last active April 8, 2020 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acidjazz/7527d5e86a6f648b9cfde518042b4f55 to your computer and use it in GitHub Desktop.
Save acidjazz/7527d5e86a6f648b9cfde518042b4f55 to your computer and use it in GitHub Desktop.
<?php
if (app()->bound('sentry') && $this->shouldReport($exception)) {
$sentry = app('sentry');
if (auth()->check()) {
\Sentry\configureScope(function (\Sentry\State\Scope $scope): void {
$scope->setUser([
'id' => auth()->user()->id,
'name' => auth()->user()->fullname,
'email' => auth()->user()->email,
]);
$scope->setTag('service', config('app.name'));
$scope->setExtra('service', config('app.name'));
});
}
$sentry->captureException($exception);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment