Livewire
When an error occurs in a Livewire component, Flare will automatically collect:
- The component class
- The updates made in the request
- The data present in the component
This data will be collected for all the components in the current Livewire request.
When using performance monitoring, Flare can keep track of the components being rendered by your application. By default we'll record the phases a component goes through:
- mounting / hydrating
- calls to the component
- rendering
- dehydrating
It is possible to combine all these phases into a single span:
use Spatie\LaravelFlare\Enums\LaravelCollectType;
'collects' => FlareConfig::defaultCollects(
extra: [
LaravelCollectType::LivewireComponents->value => [
'split_by_phase' => false,
],
],
),
When you want to ignore a specific Livewire component, add its class to the ignored array:
'collects' => FlareConfig::defaultCollects(
extra: [
LaravelCollectType::LivewireComponents->value => [
'ignored' => [\App\Http\Livewire\SomeComponent::class],
],
],
),
Livewire collection is enabled by default. You can disable it entirely by ignoring the LivewireComponents collect:
'collects' => FlareConfig::defaultCollects(
ignore: [LaravelCollectType::LivewireComponents],
),