# Configuration

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

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

This comand will create the `config/inspector.php` file.

### Environment Variables

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

<table><thead><tr><th>Variable</th><th>Type</th><th width="138">Default</th><th>Description</th></tr></thead><tbody><tr><td>INSPECTOR_API_KEY</td><td>string</td><td></td><td>Your application key to identify uniquely your application in Inspector.</td></tr><tr><td>INSPECTOR_ENABLE</td><td>boolean</td><td>true</td><td>Enable/Disable data transfer from your app to Inspection API.</td></tr><tr><td>INSPECTOR_TRANSPORT</td><td>string</td><td>async</td><td>Tha way the package sends data to the inspection API. <code>sync</code> (using php curl extension), <code>async</code> (in a background process)</td></tr><tr><td>INSPECTOR_MAX_ITEMS</td><td>integer</td><td>100</td><td>Max numebr of items recorded during an execution cycle.</td></tr><tr><td>INSPECTOR_QUERY</td><td>boolean</td><td>true</td><td>Determine if you want to report database queries.</td></tr><tr><td>INSPECTOR_QUERY_BINDINGS</td><td>boolean</td><td>false</td><td>Determine if you want to report binding values for queries.</td></tr><tr><td>INSPECTOR_USER</td><td>boolean</td><td>true</td><td>Determine if you want to attach user information in your events.</td></tr><tr><td>INSPECTOR_EMAIL</td><td>boolean</td><td>true</td><td>Determine if you want to report emails.</td></tr><tr><td>INSPECTOR_NOTIFICATIONS</td><td>boolean</td><td>true</td><td>Determine if you want to report notifications.</td></tr><tr><td>INSPECTOR_JOB</td><td>boolean</td><td>true</td><td>Determine if you want to report queued jobs execution.</td></tr><tr><td>INSPECTOR_JOB_DATA</td><td>boolean</td><td>true</td><td>Determine if you want to report the data field of the job payload.</td></tr><tr><td>INSPECTOR_VIEWS</td><td>boolean</td><td>true</td><td>Determine if you want to report views rendering stats.</td></tr><tr><td>INSPECTOR_UNHANDLED_EXCEPTIONS</td><td>boolean</td><td>true</td><td>Determine if you want to report unhandled exception fired in your application.</td></tr><tr><td>INSPECTOR_REDIS</td><td>boolean</td><td>true</td><td>Determine if you want to report redis command.</td></tr><tr><td>INSPECTOR_HTTP_CLIENT</td><td>boolean</td><td>true</td><td>Determine if you want to report Http requests done using the Laravel Http Client</td></tr><tr><td>INSPECTOR_<em>HTTP_</em>CLIENT_BODY</td><td>boolean</td><td>true</td><td>Determine if you want to report Http client response body</td></tr></tbody></table>

### Master Switch

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

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

## Ignore Urls, Commands, Jobs

Not all transactions need to be monitored in your application. Think about a Laravel Nova admin panel that is built for internal use and aren't reachable by users. Or the Livewire internal HTTP requests that arent related to your business logic.

You have many options to keep off the noise and only monitor what metter.

{% hint style="info" %}
To add these customizations, you need to publish the `inspector.php` configuration file. You can do it with the command below:&#x20;

`php artisan vendor:publish --provider="Inspector\Laravel\InspectorServiceProvider"`
{% endhint %}

### Ignore URLs

It could be necessary 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.

```php
/*
 |---------------------------------------------------------------------
 | 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*',
],

```

### Ignore Commands

You can ignore artisan commands by adding the command signature to the `ignore_commands` parameter in the `config/inspector.php` configuration file.

```php
/*
 |---------------------------------------------------------------------
 | 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',
],
```

### Ignore Jobs

You can also ignore **background jobs** adding classes to the `ignore_jobs` property:

```php
/*
|--------------------------------------------------------------------------
| Job classes to ignore
|--------------------------------------------------------------------------
|
| Add at this list the job classes that you don't want monitor.
|
*/

'ignore_jobs' => [
    //\App\Jobs\MyJob::class
],
```
