PHPackages                             inspector-apm/inspector-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. inspector-apm/inspector-laravel

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

inspector-apm/inspector-laravel
===============================

Code Execution Monitoring, built for developers.

4.19.0(2mo ago)2332.0M—1.2%21[1 issues](https://github.com/inspector-apm/inspector-laravel/issues)2MITPHPPHP ^8.1CI passing

Since Apr 16Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/inspector-apm/inspector-laravel)[ Packagist](https://packagist.org/packages/inspector-apm/inspector-laravel)[ RSS](/packages/inspector-apm-inspector-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (235)Used By (2)

Inspector | Code Execution Monitoring Tool
==========================================

[](#inspector--code-execution-monitoring-tool)

[![Total Downloads](https://camo.githubusercontent.com/8b8c603657036781aa906738c8e3adce6708516a3f53c280de39ad265684f2f8/68747470733a2f2f706f7365722e707567782e6f72672f696e73706563746f722d61706d2f696e73706563746f722d6c61726176656c2f646f776e6c6f616473)](//packagist.org/packages/inspector-apm/inspector-laravel)[![Latest Stable Version](https://camo.githubusercontent.com/8a6172b3c8eb1743d4e4caa06f7b22860afd0e22e4ccfbc6768094caf0d35dc2/68747470733a2f2f706f7365722e707567782e6f72672f696e73706563746f722d61706d2f696e73706563746f722d6c61726176656c2f762f737461626c65)](https://packagist.org/packages/inspector-apm/inspector-laravel)[![License](https://camo.githubusercontent.com/fdd00c619b98ba208a23e82d944c3ba067224637874045359c420f932d836270/68747470733a2f2f706f7365722e707567782e6f72672f696e73706563746f722d61706d2f696e73706563746f722d6c61726176656c2f6c6963656e7365)](//packagist.org/packages/inspector-apm/inspector-laravel)[![Contributor Covenant](https://camo.githubusercontent.com/4ae39ae593b602cf0ae07972b61c73728b77ec8e2cf40f579a2441948208036b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6e7472696275746f72253230436f76656e616e742d322e312d3462616161612e737667)](code_of_conduct.md)

> Before moving on, please consider giving us a GitHub star ⭐️. Thank you!

Code Execution Monitoring for Laravel applications.

- [Requirements](#requirements)
- [Install](#install)
- [Configure the Ingestion Key](#key)
- [Middleware](#middleware)
- [Test everything is working](#test)
- [AI Assisted Integration](#agentic)

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Laravel &gt;= 9.0

Install
-------

[](#install)

Install the latest version by:

```
composer require inspector-apm/inspector-laravel

```

For Lumen
---------

[](#for-lumen)

If your application is based on Lumen you need to manually register the `InspectorServiceProvider`:

```
$app->register(\Inspector\Laravel\InspectorServiceProvider::class);
```

### Configure the Ingestion Key

[](#configure-the-ingestion-key)

First put the 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](https://inspector.dev) account.

### Attach the Middleware

[](#attach-the-middleware)

To monitor HTTP requests you should attach the `WebMonitoringMiddleware` in your http application route groups.

**Laravel &lt;= 10**

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

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

**Laravel &gt;= 11**

```
use \Inspector\Laravel\Middleware\WebRequestMonitoring;

return Application::configure(basePath: dirname(__DIR__))
    ->withMiddleware(function (Middleware $middleware) {
        // Append the middleware
        $middleware->appendToGroup('web', WebRequestMonitoring::class)
            ->appendToGroup('api', WebRequestMonitoring::class);
    })
    ->create();
```

### Test everything is working

[](#test-everything-is-working)

Run the command below:

```
php artisan inspector:test

```

Go to  to explore your data.

Agentic Integration
-------------------

[](#agentic-integration)

You can connect the Inspector library documentation to your coding assistant as a Model Context Protocol (MCP) server.

It makes it easy for tools like Claude Code, Cursor, and VS Code extensions reliably understand what Inspector client library can do, its configurations, how to use it.

[AI Assisted Integration](https://docs.inspector.dev/concepts/agentic-integration)

Official documentation
----------------------

[](#official-documentation)

**[Check out the official documentation](https://docs.inspector.dev/guides/laravel/installation)**

Contributing
------------

[](#contributing)

We encourage you to contribute to Inspector! Please check out the [Contribution Guidelines](CONTRIBUTING.md) about how to proceed. Join us!

LICENSE
-------

[](#license)

This package is licensed under the [MIT](LICENSE) license.

###  Health Score

70

—

ExcellentBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity59

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 93.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Total

233

Last Release

61d ago

Major Versions

1.1.1 → 2.0.02019-05-29

2.4.5 → 3.0.02019-09-19

2.4.8 → 3.0.12019-10-01

2.4.9 → 3.0.32019-11-22

3.0.6 → 4.0.02019-12-09

PHP version history (8 changes)1.0.0PHP &gt;=7.0.0

3.0.1PHP &gt;=7.2.0

4.2.0PHP &gt;=7.1

4.4.3PHP &gt;=7.2

4.7.18PHP &gt;=7.2|^8.0

4.8.0PHP &gt;=7.2 &lt;9

4.12.0PHP ^8.1

4.17.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/320345fbe48c7cff2b3a25992c8207e959ae7817fb2fb97bb176dc6e559aacf5?d=identicon)[valerione](/maintainers/valerione)

---

Top Contributors

[![ilvalerione](https://avatars.githubusercontent.com/u/13559278?v=4)](https://github.com/ilvalerione "ilvalerione (543 commits)")[![trippo](https://avatars.githubusercontent.com/u/497169?v=4)](https://github.com/trippo "trippo (11 commits)")[![hmennen90](https://avatars.githubusercontent.com/u/77828605?v=4)](https://github.com/hmennen90 "hmennen90 (7 commits)")[![oliverquynh](https://avatars.githubusercontent.com/u/16967350?v=4)](https://github.com/oliverquynh "oliverquynh (4 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (4 commits)")[![spoyntersmith](https://avatars.githubusercontent.com/u/22387308?v=4)](https://github.com/spoyntersmith "spoyntersmith (3 commits)")[![emekaadirije](https://avatars.githubusercontent.com/u/19666053?v=4)](https://github.com/emekaadirije "emekaadirije (2 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![HosomiKai](https://avatars.githubusercontent.com/u/5814018?v=4)](https://github.com/HosomiKai "HosomiKai (1 commits)")[![SnakeO](https://avatars.githubusercontent.com/u/136700?v=4)](https://github.com/SnakeO "SnakeO (1 commits)")[![brenorr](https://avatars.githubusercontent.com/u/16088415?v=4)](https://github.com/brenorr "brenorr (1 commits)")[![tegos](https://avatars.githubusercontent.com/u/7047662?v=4)](https://github.com/tegos "tegos (1 commits)")

---

Tags

inspectorlaravellumenmiddlewaremonitoringphplaravelmonitoringinspector

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/inspector-apm-inspector-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/inspector-apm-inspector-laravel/health.svg)](https://phpackages.com/packages/inspector-apm-inspector-laravel)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[jackwh/laravel-new-relic

Monitor your Laravel application performance with New Relic

112827.2k](/packages/jackwh-laravel-new-relic)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
