inspector-apm/inspector-laravel

Real-Time monitoring for Laravel applications.

3.0.2 2019-10-02 14:09 UTC

README

Build Status Latest Stable Version

Version Compatibility

Laravel Inspector package
5.x 2.x
6.x 3.x

Install

Install the latest version of our Laravel 6.x package by:

composer require inspector-apm/inspector-laravel

If your application is using a 5.x version of the Laravel framework use the command below:

composer require "inspector-apm/inspector-laravel=^2.0"

Configure the API Key

First put the Inspector API KEY in your environment file:

INSPECTOR_API_KEY=[api key]

You can obtain INSPECTOR_API_KEY creating a new project in your Inspector dashboard.

Attach the Middleware

To monitor web requests you can attach the WebMonitoringMiddleware in your http kernel or use in one or more route groups based on your personal needs.

use Inspector\Laravel\Middleware\WebRequestMonitoring;

/**
 * The application's route middleware groups.
 *
 * @var array
 */
protected $middlewareGroups = [
    'web' => [
        ...,
        WebRequestMonitoring::class,
    ],

    'api' => [
        ...,
        WebRequestMonitoring::class,
    ]

Test everything is working

Create a test route using the code below:

Route::get('test', function () {
    throw new Excetpion('Test'));
})

Open this route in you browser to test connection between your app and Inspection API.

Official documentartion

See official documentation

LICENSE

This package are licensed under the MIT license.