druidvav/sentry-extension-bundle
sentry/sentry-laravel, but this bundle adds Symfony-specific enhancements (e.g., HttpException handling, Twig integration). Feasibility hinges on:
sentry-laravel to avoid redundancy (e.g., does it add unique value like Symfony’s ErrorListener or Span instrumentation?).SentryExtensionBundle::captureMessage()) may need Laravel-compatible facades or direct service container binding..env or config/services.php. Example:
// Symfony (YAML)
sentry_extension:
dsn: "%env(SENTRY_DSN)%"
ignore_exceptions: ["Symfony\Component\HttpKernel\Exception\HttpException"]
→ Laravel equivalent would use config/sentry.php or environment variables.HttpFoundation) may require polyfills or refactoring.ErrorHandler won’t translate 1:1. Mitigation: Feature parity analysis with sentry-laravel.ExceptionHandler, AppServiceProvider, and EventServiceProvider.sentry-laravel for core functionality.sentry-laravel or spatie/laravel-sentry?symfony/http-foundation) that can’t be polyfilled in Laravel?render() in App\Exceptions\Handler)?druidvav) active? If not, can the project be community-maintained or forked?sentry-laravel + custom listeners achieve the same goals with lower risk?Laravel Compatibility Matrix:
| Bundle Feature | Laravel Equivalent | Adaptation Required |
|---|---|---|
Symfony ErrorListener |
App\Exceptions\Handler |
Custom middleware or service provider |
| Twig integration | Blade templates | Manual Sentry capture in view composers |
| Monolog handler | Laravel’s Log facade |
Bind Monolog handler to Sentry SDK |
| HTTP exception capture | Illuminate\Http\Exception\Handler |
Extend Laravel’s exception handler |
| Span instrumentation | Laravel Telescope/Spatie DebugBar | Use sentry-laravel’s built-in spans |
Recommended Stack:
sentry/sentry-laravel (for Laravel-native features).AppServiceProvider::boot()).HandleIncomingRequest).Illuminate\Queue\Events\JobFailed).Sentry\initialize(), Sentry\captureException() calls).sentry-laravel + custom listeners for missing features.
// Example: Capture Eloquent model events
Model::saved(function ($model) {
Sentry\configureScope(fn ($scope) => $scope->setTag('model', get_class($model)));
});
Symfony\Component\HttpFoundation\Request with Illuminate\Http\Request.config/sentry.php.extra data, tags).| Symfony Component | Laravel Equivalent | Migration Note |
|---|---|---|
HttpFoundation\Request |
Illuminate\Http\Request |
Use Laravel’s request object directly |
EventDispatcher |
Illuminate\Events\Dispatcher |
Bind listeners via EventServiceProvider |
Monolog\Logger |
Illuminate\Log\Logger |
Use Log::getMonolog() |
Twig\Environment |
Blade templates | Avoid Twig; use Blade directives or JS |
HttpException → Laravel’s HttpException (compatible, but namespace differs).ContainerInterface → Laravel’s Illuminate\Container\Container.sentry-laravel as baseline.Illuminate\Queue\Events\JobFailed).How can I help you explore Laravel packages today?