Install the latest version of our Laravel package by:
composer require inspector-apm/inspector-laravel
Register our service provider in
providers array in
First put the Inspector API KEY in your environment file:
Get a fresh API key by signing up for Inspector (https://app.inspector.dev/register) and creating a new project.
By default Inspector will report:
To activate web requests inspection, you can use the Inspector middleware
WebRequestMonitoringso you are free to decide which routes need to be monitored based on your routes configuration or on your personal monitoring preferences.
Attach the middleware in the
use Inspector\Laravel\Middleware\WebRequestMonitoring; /** * The application's route middleware groups. * * @var array */ protected $middlewareGroups = [ 'web' => [ ..., WebRequestMonitoring::class, ], 'api' => [ ..., WebRequestMonitoring::class, ] ]