ddsimeonov/rollbar-php-symfony-bundle
Whoops/Laravel Debugbar may reduce perceived urgency.App\Exceptions\Handler) and log queue events (e.g., via Illuminate\Queue\Events\JobFailed).RollbarBundle, rollbar.monolog.handler) can be mapped to Laravel’s:
Monolog handler with Laravel’s Monolog facade or Log::channel().App\Exceptions\Handler::render() to forward errors to Rollbar.Event system to capture job failures, HTTP errors, etc.rollbar/rollbar SDK is Laravel-compatible (no Symfony dependencies), reducing friction for core functionality.config/packages/rollbar.yaml → Laravel’s config/rollbar.php (minimal refactor).| Risk Area | Mitigation Strategy |
|---|---|
| Deprecation Risk | Fork the repo or migrate to an alternative (e.g., Sentry, Bugsnag) post-January 2025. |
| Symfony-Specific Code | Abstract Symfony dependencies (e.g., EventDispatcher) via interfaces. |
| Performance Overhead | Profile Rollbar’s payload size/transmission; use rollbar.report() sparingly. |
| Laravel Ecosystem Gaps | Fill gaps (e.g., queue job tracking) with custom listeners or Laravel packages. |
Debugbar/Whoops or alternatives like Sentry?App\Exceptions\Handler).Monolog or Log::channel()).Illuminate\Http\Events\RequestHandled).KernelEvents) → Replace with Laravel’s Event system.JobFailed events to report queue failures.Artisan\Events\ArtisanStarting/Artisan\Events\ArtisanFinished.rollbar/rollbar via Composer.rollbar.php (mirror Symfony’s rollbar.yaml).App\Exceptions\Handler to report uncaught exceptions:
use Rollbar\Rollbar;
public function render($request, Throwable $exception) {
Rollbar::report($exception);
return parent::render($request, $exception);
}
Monolog handler or use Laravel’s Log::channel():
Log::channel('rollbar')->error('Custom log message', ['context' => $data]);
JobFailed, ModelSaved, etc.auth()->user()).| Laravel Component | Rollbar Integration Strategy |
|---|---|
| Exception Handling | App\Exceptions\Handler extension |
| Logging | Monolog handler or Log::channel() |
| Middleware | Custom middleware for HTTP errors |
| Queue Workers | JobFailed event listener |
| Artisan Commands | Artisan\Events listeners |
| Blade Templates | Custom error pages with Rollbar context |
Log::channel().rollbar.yaml → Laravel’s rollbar.php may diverge if not standardized.config/caching).monolog may introduce breaking changes.composer.json; monitor Laravel’s monolog updates.Rollbar::critical() for P0 errors only.rollbar:archive command).queue:work).rollbar.report_later() for non-critical paths.config('rollbar.environment')).rollbar.set_environment() dynamically.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Rollbar API Unavailable | Errors logged locally only. | Fallback to storage/logs/laravel.log. |
| Configuration Errors | No errors reported. | Validate rollbar.php on deploy. |
| Payload Size Limits Exceeded | Truncated stack traces. | Sanitize data; use rollbar.payload_max_size. |
| Fork Abandonment (Post-2025) | No updates/security patches. | Migrate to Sentry/Bugsnag. |
rollbar.php, and test with php artisan tinker:
How can I help you explore Laravel packages today?