# Configuration

The Ingestion Key  is the only required configuration parameter, but the Inspector package is designed to help you deeply customize the monitoring strategy based on your application needs.

### Ignore Routes

It could be needed to turn off monitoring based on **url.** Think about paths like `/backend`, or other parts of your app that has nothing to do with the user experience.

You can easily ignore these path listing them into the `ignoreRoutes` array of `app/Config/Inspector.php` configuration file.

```php
class Inspector extends BaseConfig
{
    ...
    
    /**
     * List the path you don't want to monitor (Support for wildcard "*").
     *
     * @var array
     */
    public $ignoreRoutes = [
        'backend*'
    ];
    
    ...
}
```

{% hint style="warning" %}
You can also use the wildcard character **`*`** to exclude all sub-paths.
{% endhint %}

### Ignore Commands

You can ignore spark commands adding the command name to the `ignoreCommands` property in the `app/Config/Inspector.php` configuration file.

```php
class Inspector extends BaseConfig
{
    ...
    
    /**
     * List the commands you don't want to monitor (Support for wildcard "*").
     *
     * @var array
     */
    public $ignoreCommands = [
        'inspector:install',
        'serve',
        'make:*',
        'db:*',
        'migrate',
    ];
    
    ...
}
```

### Access the Inspector instance

You can get the current Inspector instance using the helper function:

```php
// Load the helper
helper('inspector');

// Use the inspector() function
inspector()->addSegment(function () {
    // Your code here...
}, 'type', 'label');
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inspector.dev/guides/codeigniter/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
