laravel-enso/sentry is a Laravel package for sentry exception handling for laravel enso.
It currently has 0 GitHub stars and 24.891 downloads on Packagist (latest version 2.0.3).
Install it with composer require laravel-enso/sentry.
Discover more Laravel packages by laravel-enso
or browse all Laravel packages to compare alternatives.
Last updated
Sentry integrates Laravel Enso with Sentry error reporting.
The package provides a small exception-reporting helper that enriches captured events with the current Enso user and role, deduplicates repeated exceptions for a configurable interval, stores the last Sentry event id per authenticated user, and exposes an authenticated endpoint that allows the frontend to retrieve that event id.
It is designed to complement Enso's backend exception pipeline and frontend error-reporting flows without requiring application code to talk to the Sentry SDK directly.
Install the package in an application that already uses the Sentry Laravel SDK:
composer require laravel-enso/sentry
If needed, publish the package config:
php artisan vendor:publish --tag=enso-sentry-config
Default configuration:
return [
'dedupeInterval' => 5,
];
Report an exception through the package handler:
use LaravelEnso\Sentry\Exceptions\Handler;
Handler::report($exception);
Read the current event id from backend code:
$eventId = Handler::eventId();
The frontend can retrieve the same value from:
route('sentry');
Which returns:
{
"eventId": "..."
}
::: tip Tip The handler stores the event id only when the application is running in production and an authenticated user is available. :::
Authenticated endpoint:
GET /api/sentryRoute name:
sentryMiddleware:
apiauthLaravelEnso\Sentry\Http\Controllers\Sentry
Returns:
eventIdLaravelEnso\Sentry\Exceptions\Handler
Public methods:
report(Throwable $exception): voideventId(): ?stringBehavior:
web, and sanctumconfig/enso/sentry.php
Keys:
dedupeIntervalFramework dependency:
Companion frontend package:
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!