inspector-apm/inspector-laravel

Real-Time monitoring for Laravel applications.

4.6.0 2020-10-14 14:58 UTC

README

Build Status Latest Stable Version

Requirements

  • PHP >= 7.2.0
  • Laravel >= 5.5

Install

Install the latest version of our package by:

composer require inspector-apm/inspector-laravel

Configure the API Key

First put the Inspector Ingestion Key in your environment file:

INSPECTOR_INGESTION_KEY=[ingestion key]

You can obtain an INSPECTOR_INGESTION_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.

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

    'api' => [
        ...,
        \Inspector\Laravel\Middleware\WebRequestMonitoring::class,
    ]

Test everything is working

Run the command below:

php artisan inspector:test

Go to https://app.inspector.dev/home to explore your data.

Official documentation

See official documentation

LICENSE

This package are licensed under the MIT license.