Installation
How to connect your CodeIgniter application to Inspector.

Requirements

  • PHP >= 7.2
  • CodeIgniter >= 4

Install via composer

Type the command below in your terminal to install the latest version of the bundle:
composer require inspector-apm/inspector-codeigniter

Create a new config class

In order to start using the library, you have to create a configuration class. You can use the make:config command:
./spark make:config Inspector
Add the configuration properties as shown in the code below:
<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class Inspector extends BaseConfig
{
/**
* set to true if you want all your controller methods to be 'auto-inspected'
* set to false to set your own inspection points - provides more flexibility
*
* @var bool
*/
public $AutoInspect = true;
/**
* application ingestion key, you can find this on your inspector dashboard
*
* @var string
*/
public $IngestionKey = 'YOUR_INGESTION_KEY';
/**
* @var bool
*/
public $Enable = true;
/**
* Remote endpoint to send data.
*
* @var string
*/
public $URL = 'https://ingest.inspector.dev';
/**
* @var string
*/
public $Transport = 'async';
/**
* Transport options.
*
* @var array
*/
public $Options = [];
/**
* Max numbers of items to collect in a single session.
*
* @var int
*/
public $MaxItems = 100;
}
Last modified 19d ago