Laravel Octane
Flare works out of the box with Laravel Octane. No further configuration is required.
How it works under Octane
Under Octane, the application boots once and serves many requests in the same PHP process. The Flare service provider detects this (either by an active Octane runtime or the LARAVEL_OCTANE env var) and switches the trace lifecycle into subtask mode automatically.
What that means in practice:
- Each request is its own trace. The application span is opened when the request comes in and closed when it terminates. Spans, queries, log records, and dumps recorded during the request belong to that request only.
- Everything is flushed at the end of each request. When the request terminates, Flare sends the collected errors, trace, and logs to Flare in a single payload and resets its internal state. The next request starts from a clean slate, so nothing collected for one request can leak into another.
- Octane tasks and ticks are tracked.
Laravel\Octane\Events\TaskReceivedstarts a subtask,TickReceivedends one, so background tasks scheduled withOctane::concurrently()show up as separate traces.
You can read more about how subtask mode works in the PHP application lifecycle docs.
- On this page
- How it works under Octane