- How do I install Laravel Flare for Laravel 12/13?
- Run `composer require spatie/laravel-flare`, then execute `php artisan flare:install`. Add your Flare API key to `.env` under `FLARE_API_KEY` and update `config/logging.php` to include the 'flare' channel. No additional steps are needed for basic setup.
- Does Laravel Flare work with Laravel Vapor or Octane?
- Yes, Flare supports both Vapor and Octane. For Octane, ensure you’re on version 2.0.7+ of the package, and Flare will automatically capture performance metrics. Vapor works out-of-the-box with queue job tracking enabled by default.
- Can I filter which errors or logs are sent to Flare?
- Absolutely. Use `config/flare.php` to define sampling rules, such as excluding specific routes (e.g., `/health`), log levels (e.g., `debug`), or even dynamic conditions like request payload size. This helps reduce noise and costs.
- Is Laravel Flare compatible with Livewire 4?
- Yes, starting with version 2.7.0 of `laravel-flare`, Livewire 4 support is included. Flare captures stack frames (SFCs) and component interactions automatically. Ensure your Livewire version is 4.x and the package is updated.
- How do I handle sensitive data like API keys or user emails in error reports?
- Flare automatically censors cookies, sessions, and other sensitive data by default (v2.6.2+). For custom attributes, use the `flare:attribute` middleware or `FlareAttributeProvider` to filter or mask PII before sending.
- What’s the performance impact of using Laravel Flare in production?
- Flare is designed for low overhead. Use the `DaemonSender` (async) or `LaravelHttpSender` (batch HTTP requests) to minimize latency. Configure sampling rules to exclude high-frequency, non-critical routes, and monitor performance via Flare’s dashboard.
- Can I use Laravel Flare alongside Sentry or Datadog?
- Yes, but avoid duplicate data by configuring sampling rules or log level filtering. Flare’s OpenTelemetry format allows exporting logs to other tools if needed. Ensure your team aligns on which tool handles alerts vs. debugging.
- How do I test Laravel Flare locally before deploying to production?
- Run `php artisan flare:test` to trigger a test error and verify Flare receives it. Use the `flare:workbench` command to simulate production environments locally. Check the Flare dashboard for the test report to confirm setup.
- What’s the difference between Flare and Laravel Ignition?
- Ignition is for local development (beautiful error pages), while Flare is for production monitoring (tracking errors, logs, and performance). You can use both: Ignition for dev and Flare for production. Flare also supports public error sharing, unlike Ignition.
- Are there any breaking changes when upgrading from v2.x to v3.0+?
- Yes, v3.0+ removes `reportMessage()` in favor of the `flare` log channel. Update your code to use `Log::channel('flare')->error($message)` instead. Review the [changelog](https://github.com/spatie/laravel-flare/blob/main/CHANGELOG.md) for other deprecations.