Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Flare Daemon

Flare Daemon Laravel Package

spatie/flare-daemon

View on GitHub
Deep Wiki
Context7

Local HTTP daemon for asynchronous Flare delivery

Frequently asked questions about Flare Daemon
How do I install and activate the Flare daemon in Laravel?
Run `composer require spatie/flare-daemon` and set the `FLARE_DAEMON_LISTEN` environment variable to `127.0.0.1:8787` (default). No additional configuration is needed—it auto-detects your Flare API key from Laravel’s config. For local testing, use the `--verbose` flag with the daemon’s CLI command.
Will this work with Laravel 8.x/9.x on PHP 8.1?
Yes, the daemon now officially supports PHP 8.1, making it compatible with Laravel 8.x/9.x. No PHP version upgrades are required. The ReactPHP stack and event-loop architecture remain unchanged, ensuring stability for legacy Laravel apps.
Does the daemon support performance traces and logs, or just errors?
The daemon handles errors, performance traces, and logs—all sent asynchronously to Flare. It buffers payloads per API key and entity type, then flushes them periodically. This ensures comprehensive observability without blocking your Laravel app’s critical path.
How does the daemon handle high-traffic Laravel apps (e.g., e-commerce)?
The daemon uses ReactPHP’s event loop for non-blocking HTTP handling and in-memory buffering. It flushes payloads every second (configurable) and includes backpressure mechanisms (e.g., pausing ingestion on 429/403 responses). Test with `loadtest` to validate under load.
Can I run the daemon in production on shared hosting with PHP 8.1?
Yes, the daemon is designed for production use and works on shared hosting with PHP 8.1. Use the `vendor/bin/flare-daemon` path and set `FLARE_DAEMON_LISTEN` to a local socket (e.g., `unix:///tmp/flare.sock`). Ensure your hosting allows long-running processes and PHP CLI access.
What happens if the daemon crashes or is unreachable?
The Flare PHP client (spatie/laravel-flare) includes a fallback to direct delivery if the daemon is down. Payloads are buffered locally until the daemon restarts. For critical systems, monitor the daemon’s health via `curl http://localhost:8787/health`.
Is there a way to test the daemon locally before deploying to production?
Use the `test.sh` script (included in the repo) or the `--verbose` flag to simulate payloads and inspect upstream responses. For Laravel Valet/Docker/Homestead, ensure the daemon’s port (`8787`) is exposed and accessible. Test with `curl -v http://localhost:8787/health` to verify connectivity.
Does the daemon work with Laravel Forge/Envoyer or Kubernetes deployments?
Yes, the daemon integrates seamlessly with Forge/Envoyer via their built-in process management. For Kubernetes, use a sidecar container or a `cronJob` to restart the daemon on failures. The daemon’s graceful shutdown and Composer.lock watcher ensure smooth deployments.
Are there any known issues with PHP 8.1 vs. 8.2+?
No architectural changes were made—this is a PHAR rebuild for PHP 8.1 compatibility. The ReactPHP stack and memory management (default 128M) are identical. Benchmark locally if you suspect performance differences, but the daemon’s async design mitigates most edge cases.
What alternatives exist for async error/log reporting in Laravel?
Alternatives include Sentry’s SDK (with async workers), Laravel’s built-in `Log::stack`, or custom queue-based solutions (e.g., `spatie/laravel-activitylog` with queues). However, Flare’s daemon offers native trace/log support, zero-config integration, and a unified UI for debugging—ideal for Laravel’s ecosystem.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony