Inspector for PHP applications.

2.4.1 2019-08-01 17:01 UTC


Build Status Latest Stable Version

Inspector is a composer package to add Real-Time performance and error alerting in your Laravel applications.

Install the latest version by:

composer require inspector-apm/inspector-php


To start sending data to Inspector you need an API key to create a configuration instance. You can obtain INSPECTOR_API_KEY creating a new project in your Inspector dashboard.

require __DIR__ . '/../vendor/autoload.php';

use Inspector\Inspector;
use Inspector\Configuration;

$configuration = new Configuration('YOUR_API_KEY');
$inspector = new Inspector($configuration);

All start with a transaction. Transaction represent an execution cycle and it can contains one or hundred of segments:

// Start execution cycle with a transaction

// Trace performance of code blocks
$segment = $inspector->startSegment('my-process');
try {

    throw new UnauthorizedException("You don't have permission to access.");

} catch(UnauthorizedException $exception) {
} finally {

Inspector will collect many useful information to produce performance chart in your dashboard.

See official documentation


This package are licensed under the MIT license.