Configuration

Customize the package behaviour.

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_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:

php artisan vendor:publish --provider="Inspector\Laravel\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 (commands, url, jobs)

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.

You can also ignore background jobs adding classes to the ignore_jobs property.

Inspector gives you the ability to ignore these parts of your application 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' => [
'telescope*',
'vendor/telescope*',
'horizon*',
'vendor/horizon*',
],
/*
|---------------------------------------------------------------------
| Artisan command to ignore
|---------------------------------------------------------------------
|
| Add at this list all command signature that you don't want monitoring
| in your Inspector dashboard.
|
*/
'ignore_commands' => [
'migrate:rollback',
'migrate:fresh',
'migrate:reset',
'migrate:install',
'package:discover',
'queue:listen',
'queue:work',
'horizon',
'horizon:work',
'horizon:supervisor',
],
/*
|--------------------------------------------------------------------------
| Job classes to ignore
|--------------------------------------------------------------------------
|
| Add at this list the job classes that you don't want monitor.
|
*/
'ignore_jobs' => [
//\App\Jobs\MyJob::class
],