Inspector
BlogTry for free
  • Concepts
    • Introduction
    • Metrics
    • Notification Channels
      • Email
      • Slack
      • Telegram
      • Microsoft Teams
      • Google Chat
      • Webhook
      • Discord
      • Pushover
      • PagerDuty
      • Twilio - SMS
    • Filtering Syntax
    • Alerts
    • Grouping Patterns
    • Custom Segments
    • Billing
    • AI Bug Fixer
  • Security and access
    • Access control
    • Two-factor authentication
    • Connected Devices
  • SDK
    • PHP
      • Installation & Set Up
      • Custom Segments
      • Exceptions Monitoring
      • Configuration
    • Laravel / Lumen
      • Upgrade Guide
      • Installation & Set-up
      • Http Requests Monitoring
      • Configuration
      • Exception Monitoring
      • Laravel Vapor
      • Laravel Octane
      • Laravel Nova Tool
      • Group by service name
    • Symfony
      • Installation
      • Configuration
      • Exception Monitoring
    • CodeIgniter
      • Installation
      • Configuration
      • Exception Monitoring
    • Drupal
    • Spring Boot
    • Slim
    • NodeJS
      • Configurations
      • Custom Segments
      • Exception monitoring
      • Autowiring
    • ExpressJs
    • Fastify
    • Python
    • Django
      • Installation & Set Up
      • Custom Segments
      • Error Monitoring
  • REST API
    • Authentication
    • Apps
    • Platforms
    • Transactions
    • Segments
    • Analytics
Powered by GitBook
On this page
  • Ignore Routes
  • Ignore Commands
  • Access the Inspector instance
  1. SDK
  2. CodeIgniter

Configuration

Fine tune the CodeInginter monitoring strategy on your needs.

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.

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

You can also use the wildcard character * to exclude all sub-paths.

Ignore Commands

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

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:

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

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

PreviousInstallationNextException Monitoring

Last updated 4 months ago