Laravel Octane aims at improving Laravel applications' performance by serving them using high-powered application servers, including Swoole, Open Swoole, and RoadRunner.
Integrating Blackfire with Laravel Octane lets you monitor and profile the requests served through Octane:
You must, first, enable monitoring on your environment.
laravel/octane
>= 1.2.7laravel/laravel
>= 8.81illuminate/support
>= 8.0Add Blackfire PHP SDK as a dependency in your project (1.30+ version).
The Blackfire PHP SDK provides a Laravel Octane Service Provider that eases collecting Monitoring data for the HTTP requests served through Octane.
All Laravel's service providers are
registered in the config/app.php
configuration file:
1 2 3 4 5
'providers' => [
// Other Service Providers
\Blackfire\Bridge\Laravel\OctaneServiceProvider::class,
],
The Laravel Octane Profiler Middleware allows to trigger Profiles from the Browser Extensions.
Edit your app/Http/Kernel.php
:
1 2 3 4 5
protected $middleware = [
\Blackfire\Bridge\Laravel\OctaneProfilerMiddleware::class,
// Other Middlewares
];