spatie/laravel-flare
Send Laravel errors to Flare. With a valid Flare API key, production errors are tracked and you're notified when they happen. Works with Laravel 11+ on PHP 8.2+, and pairs with spatie/laravel-ignition for beautiful error pages.
Architecture fit
spatie/flare-client-php (^3.0 constraint in v3), so the runtime behavior you inherit is largely the client's, not the wrapper's.config/flare.php, env-driven configuration (FLARE_KEY), a custom Monolog channel ('flare') that can be dropped into LOG_STACK, middleware (FlareTracingMiddleware) for request tracing, plus console/queue recorders. That means it fits any conventional Laravel app without touching application code paths — no manual report() calls required for the error path.RateSampler, DynamicSampler) was added with Laravel-aware rules (route name, route action, queue name, queue connection), and two sender strategies exist (LaravelHttpSender default, DaemonSender for local daemon routing). Meanwhile, error solutions support and reportMessage() were removed. A TPM should treat v3 as a new product surface, not a patch.configuring() hook to mutate FlareConfig before boot (3.1.1).Integration feasibility
composer require spatie/laravel-flare, publish config, set the key, optionally add flare to the log stack. Realistic estimate is hours for a working error feed, 1–2 engineer-days including configuration hardening and verification.max_attribute_size_in_kb — both are acknowledgements that default payloads are sensitive and can be large.Technical risk
composer.json, not the prose.reportMessage() and the spatie/error-solutions dependency. Teams that adopted 2.x APIs will need scheduled remediation work.--exclude-group=integration runs only unit tests. If your CI runs the fast path, the actual send pipeline is effectively untested — a genuine risk for a package whose entire job is a network side effect.Key questions
reportMessage()-style APIs (removed in v3) or relying on standard Monolog channels that survive a swap?Stack fit
spatie/laravel-ignition; the README explicitly says you can install both, with Ignition serving local developer error pages and Flare handling production reporting. Keep that split; do not let Flare's presence change local DX.Migration path
reportMessage() call sites must be rewritten onto the flare log channel, and error-solutions middleware/config keys removed. Follow UPGRADING.md explicitly.Compatibility
spatie/flare-client-php ^3.0 resolves cleanly against existing Spatie packages; 2.0.1's "Use correct dependency" fix shows this coupling has broken before.vendor/bin/testbench serve + queue:work) so the send path is actually exercised.Sequencing
minimal_log_level, and max_attribute_size_in_kb before the first event ships. Retrofitting redaction after data is in a vendor dashboard is not fully reversible.flare channel to LOG_STACK on staging and observe volume and cost impact for a week.RateSampler initially; DynamicSampler once you know which routes and queues are noisy).Maintenance
Support
Scaling
LaravelHttpSender sends over HTTP. At high error volume, or during an error storm, this competes for request/worker time. Evaluate DaemonSender or route sends off the request path before scaling traffic, and confirm fail-open behavior under ingest latency.DynamicSampler with route-action and queue rules lets you drop health-check and high-frequency job noise while keeping the long tail. Do this before the first quota overage, not after.max_attribute_size_in_kb caps trace attributes, but large request bodies and query bindings remain the usual cause of oversized events and truncated context.Failure modes
flare added to LOG_STACK alongside existing handlers can duplicate volume and inflate cost; confirm intent before fanning out.Ramp-up
How can I help you explore Laravel packages today?