> For the complete documentation index, see [llms.txt](https://docs.inspector.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inspector.dev/guides/codeigniter/configuration.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
