Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate Sentry for error tracking and performance monitoring #184

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

VITE_APP_NAME="${APP_NAME}"
SENTRY_LARAVEL_DSN=null
SENTRY_REACT_DSN=null
2 changes: 2 additions & 0 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Http\Request;
use Sentry\Laravel\Integration;

return Application::configure(basePath: dirname(__DIR__))
->withRouting(
Expand All @@ -19,6 +20,7 @@
$middleware->append(LanguageMiddleware::class);
})
->withExceptions(function (Exceptions $exceptions) {
Integration::handles($exceptions);
$exceptions->render(function (AuthenticationException $e, Request $request) {
return response()->json(['error' => 'Unauthorized', 401]);
});
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"laravel/framework": "^11.0",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9",
"laraveles/spanish": "^1.5"
"laraveles/spanish": "^1.5",
"sentry/sentry-laravel": "^4.13"
},
"require-dev": {
"driftingly/rector-laravel": "^1.0",
Expand Down
Loading