Configuration
Customize the monitoring strategy in your Laravel application.

Environment Variables

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
async
Tha way the package sends data to the inspection API. sync (using php curl extension), async (in a background process)
INSPECTOR_MAX_ITEMS
integer
100
Max numebr of items recorded during an execution cycle.
INSPECTOR_QUERY
boolean
true
Determine if Inspector should report database queries.
INSPECTOR_QUERY_BINDINGS
boolean
false
Determine if Inspector should report binding values for queries.
INSPECTOR_USER
boolean
true
Determine if Inspector should attach user information in your events.
INSPECTOR_EMAIL
boolean
true
Determine if Inspector should report emails.
INSPECTOR_NOTIFICATIONS
boolean
true
Determine if Inspector should report notifications.
INSPECTOR_JOB
boolean
true
Determine if Inspector should report queued jobs execution.
INSPECTOR_VIEWS
boolean
true
Determine if Inspector should report views rendering stats.
INSPECTOR_UNHANDLED_EXCEPTIONS
boolean
true
Determine if Inspector should report unhandled exception fired in your application.
INSPECTOR_REDIS
boolean
true
Determine if Inspector should report redis command.
If you want full control of the package behaviour publish the configuration file:
1
php artisan vendor:publish --provider="Inspector\Laravel\InspectorServiceProvider"
Copied!
That will add config/inspector.php file in your Laravel configuration directory.

Master Switch

If desired, you may disable data transfer setting to false the enable configuration option:
1
'enable' => env('INSPECTOR_ENABLE', true),
Copied!

Ignore transactions (urls, commands, jobs)

Not all 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, or other parts of your app that is built for internal use and aren't reachable by users.
You have many options to keep off the noise, and only monitor what metter.
To add these customizations you need to publish the inspector.php configuration file if you haven't already: php artisan vendor:publish --provider="Inspector\Laravel\InspectorServiceProvider"

Ignore URLs

It could be needed to turn off monitoring based on url. Think about paths like /nova, /telescope, or other parts of your app that don't affect the user experience.
You can also use the wildcard character * to exclude all sub-paths.
1
/*
2
|---------------------------------------------------------------------
3
| Web request url to ignore
4
|---------------------------------------------------------------------
5
|
6
| Add at this list the url schemes that you don't want monitoring
7
| in your Inspector dashboard. You can also use wildcard expression (*).
8
|
9
*/
10
11
'ignore_url' => [
12
'telescope*',
13
'vendor/telescope*',
14
'horizon*',
15
'vendor/horizon*',
16
],
17
Copied!

Ignore Commands

You can ignore artisan commands adding the command signature to the ignore_commands parameter in the config/inspector.php configuration file.
1
/*
2
|---------------------------------------------------------------------
3
| Artisan command to ignore
4
|---------------------------------------------------------------------
5
|
6
| Add at this list all command signature that you don't want monitoring
7
| in your Inspector dashboard.
8
|
9
*/
10
11
'ignore_commands' => [
12
'migrate:rollback',
13
'migrate:fresh',
14
'migrate:reset',
15
'migrate:install',
16
'package:discover',
17
'queue:listen',
18
'queue:work',
19
'horizon',
20
'horizon:work',
21
'horizon:supervisor',
22
],
Copied!

Ignore Jobs

You can also ignore background jobs adding classes to the ignore_jobs property:
1
/*
2
|--------------------------------------------------------------------------
3
| Job classes to ignore
4
|--------------------------------------------------------------------------
5
|
6
| Add at this list the job classes that you don't want monitor.
7
|
8
*/
9
10
'ignore_jobs' => [
11
//\App\Jobs\MyJob::class
12
],
Copied!