Inspector logo


You can use the following environment variables to determine how Inspector will collect information for your application:

Variable Type Default Description
INSPECTOR_API_KEY string Your application key to identify uniquely your application in Inspector.
INSPECTOR_ENABLE boolean true Enable/Disable data transfer from your app to Inspection API.
INSPECTOR_TRANSPORT string sync Read more about data transfer
INSPECTOR_QUERY boolean true Determine if Inspector will register database queries.
INSPECTOR_QUERY_BINDINGS boolean false Deterimine if Inspector need to report binding values for queries.
INSPECTOR_USER boolean true Determine if Inspector will attach user information in your events.
INSPECTOR_EMAIL boolean true Determine if Inspector will report email sending.
INSPECTOR_JOB boolean true Determine if Inspector will report queued jobs execution.
INSPECTOR_UNHANDLED_EXCEPTIONS boolean true Determine if Inspector will report unhandled exception fired in your application.

If you want full control of the package behaviour publish the configuration file:

php artisan vendor:publish --provider="Inspector\InspectorServiceProvider"

That will add config/inspector.php file in your Laravel configuration directory.

Master Switch

If desired, you may disable data transfer to Inspector setting to false the enable configuration option:

'enable' => env('INSPECTOR_ENABLE', true),

Ignore transactions

Not any transactions need to be monitored in your application. Think about the artisan commands used for application maintainance or deployment, like: migrate:xxx, queue:xxx , horizon:xxx.

Also could be some part of your application that you need to exclude by a specific url, like /nova, /telescope, or other not relevant path generated from other packages.

Inspector gives you the ability to ignore these transactions adding appropriate rules in the app/inspector.php configuration file:

 | Web request url to ignore
 | Add at this list the url schemes that you don't want monitoring
 | in your Inspector dashboard. You can also use wildcard expression (*).
'ignore_url' => [

 | Artisan command to ignore
 | Add at this list all command signature that you don't want monitoring
 | in your Inspector dashboard.
'ignore_commands' => [

{info} Remember tp publish the package configuration file to apply your customization:

php artisan vendor:publish --provider="Inspector\InspectorServiceProvider"

Async transport

Inspector start to send data to the Inspection API after your application has sent the response to the user. This guarantee optimal performance from your users point of view.

By default the package use php CURL extension to send data out of your server in a synchronous way. This means that after response has sent to your user, your application still working for a few milliseconds to accomplish data transfer and your php engine can't close the execution if CURL isn't finished.

If your backend serves a huge amount of traffic you could prefer to execute data transfer in background at server level and leave the php engine free to close its execution. The package will run CURL from exec function, like a cli command, so data transfer is executed silently and your script will terminate immediately.

{warning} Async transport works only on Unix based server.

Although it is the most efficient way to send data, you will not be able to know if the transfer fails and why. Instead using the sync method the package records any failures in the apache logs for debugging purpose. Consider to start using sync method and when your are sure that everything is working on your server you can switch to async.

You may active async transport setting to async the transport configuration option:

// 'async' will activate background data transfer
'transport' => env('INSPECTOR_TRANSPORT', 'sync'),