The Atatus Laravel Octane Middleware enables the automatic instrumentation of API requests in Laravel Octane, capturing them and sending data to Atatus, which gives you a comprehensive Laravel Octane Performance Monitoring.

This Laravel Octane Middleware works both for Swoole Monitoring and Roadrunner Monitoring in Octane.

Atatus Laravel Octane Middleware Installation Steps

  1. Make sure the Atatus PHP agent is installed on your host. If not, follow the installation steps to install the Atatus PHP agent.

  2. Install/Configure Atatus Middleware

    Option 1: Install the atatus-octane laravel package using composer.

    copy
    icon/buttons/copy
    composer require atatus/atatus-octane
    

    Option 2: Add atatus/atatus-octane to your project's composer.json file, and run composer install.

  3. To monitor laravel octane requests, attach WebRequestMonitoring middleware within the web and api middleware groups in the App/Http/Kernel.php file as shown below:


// In App/Http/Kernel.php

protected $middlewareGroups = [
    'web' => [
        ...,
        \Atatus\Laravel\Octane\Middleware\WebRequestMonitoring::class,
    ],

    'api' => [
        ...,
        \Atatus\Laravel\Octane\Middleware\WebRequestMonitoring::class,
    ]
]