spatie/flare-daemon
A long-running PHP daemon that accepts error reports, traces, and logs from your Laravel app over local HTTP and forwards them to Flare asynchronously, keeping Flare delivery off your request path with automatic fallback to direct delivery.
ingress.flareapp.io. The daemon moves that to a local 127.0.0.1:8787 POST and flushes asynchronously on a ~1s cycle, so this is a latency and tail-latency decision, not a features decision. It directly supports p95/p99 SLO work on high-traffic endpoints.internalTrafficPolicy=Local — which is a platform-team decision about where the daemon lives (per-node, per-pod sidecar, or per-host process) rather than an application-code decision. That's a good candidate for a platform standard rather than per-team improvisation.composer.lock-change shutdown for zero-dropped-reports deploys) are already handled and are surprisingly easy to get wrong in-house.composer update silently changed production behaviour./health and /status endpoints plus the tests/test.sh smoke path mean we can add a daemon health check to runbooks and synthetic monitoring — a small but real reduction in MTTD for "we stopped receiving errors and nobody noticed."Adopt when most of these hold:
FLARE_DAEMON_UPSTREAM exists, but you'd be implementing Flare's contract). This is not a generic telemetry relay.phpMemoryLimit defaults to 128M), the port exposure, and the restart policy. Unowned daemons become mystery CPU consumers.runtime/composer.json, so ReactPHP/PSR-7 never enter your application's dependency graph. If your team has been burned by transitive dependency conflicts, this is the reason to prefer it over a "just add a queue worker" alternative.Look elsewhere (or stay direct) when:
For executives (one paragraph): Flare's PHP client already installs this daemon by default; turning it on moves error and log delivery off the user request path and onto a local background process. The effect is lower and more predictable response times on our busiest endpoints, plus reduced exposure when the vendor has an outage or rate-limits us — and if the daemon isn't running, the client falls back to today's behaviour automatically. It's MIT-licensed, adds no dependencies to our application, and is enabled per-environment, so we can pilot it on one service and measure before committing. Cost is an extra small long-running process per host and the ownership of its container image.
For engineering leads: Install-and-enable are decoupled — upgrading the Flare client gives us the daemon inert, and activation is explicit. The Composer bin is a self-contained PHAR with its own isolated ReactPHP runtime, so no PSR-7 or event-loop version constraints leak into composer.lock. Configuration is entirely environment variables (listen address, upstream, buffer thresholds, upstream timeout, FLARE_COMPOSER_LOCK), and SIGINT/SIGTERM drain buffers before exit — including an optional graceful shutdown when composer.lock changes, which lines up cleanly with deploy hooks. For Kubernetes we use the published OCI Helm chart as a per-node DaemonSet with node-local routing and client-side fallback; for single hosts, a supervised vendor/bin/flare-daemon. Rollout plan: health//status check in the runbook, smoke test against a real API key in staging, load test with the bundled k6 script against our own traffic shape, then enable per environment behind a config flag.
Ask: approve a one-sprint pilot on one high-traffic service, with success measured as p95/p99 request latency delta and zero lost error reports across a deploy.
How can I help you explore Laravel packages today?