PHPackages                             magidmroueh/scout-apm-lumen - 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. magidmroueh/scout-apm-lumen

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

magidmroueh/scout-apm-lumen
===========================

Scout Application Performance Monitoring Agent - https://scoutapm.com

0.1(5y ago)08451MITPHPPHP &gt;=7.1.0,&lt;7.5.0

Since Dec 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/magidmroueh/scout-apm-lumen)[ Packagist](https://packagist.org/packages/magidmroueh/scout-apm-lumen)[ Docs](https://scoutapm.com/)[ RSS](/packages/magidmroueh-scout-apm-lumen/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (15)Versions (2)Used By (0)

Scout Lumen APM Agent
=====================

[](#scout-lumen-apm-agent)

[![License](https://camo.githubusercontent.com/2ccee566fc5a98368d649a00adc889e31decc67f68440dba7b957b3d1e658410/68747470733a2f2f706f7365722e707567782e6f72672f73636f75746170702f73636f75742d61706d2d6c61726176656c2f6c6963656e7365)](https://packagist.org/packages/scoutapp/scout-apm-laravel)

Monitor the performance of PHP Laravel applications with Scout's PHP APM Agent. Detailed performance metrics and transaction traces are collected once the scout-apm package is installed and configured.

Important: Lumen
----------------

[](#important-lumen)

To get this working with Lumen, there are a couple of changes you need to make:

- Ensure `$app->register(App\Providers\EventServiceProvider::class);` is registered in app.php
- Add `$app->register(\Scoutapm\Laravel\Providers\ScoutApmServiceProvider::class);` as the final registered provider in app.php
- Add the following middleware to the global middleware in app.php:

```
$app->middleware([
    //These should be the first 3 middlewares in the array
    SendRequestToScout::class,
    IgnoredEndpoints::class,
    MiddlewareInstrument::class,

    //Any other middleware here....

    //Finally, this middleware
    ActionInstrument::class
]);
```

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

[](#requirements)

- PHP Version: PHP 7.1+
- Laravel Version: 5.5+

Quick Start
-----------

[](#quick-start)

A Scout account is required. [Signup for Scout](https://scoutapm.com/users/sign_up).

```
composer require scoutapp/scout-apm-laravel
```

Then use Laravel's `artisan vendor:publish` to ensure configuration can be cached:

```
php artisan vendor:publish --provider="Scoutapm\Laravel\Providers\ScoutApmServiceProvider"
```

### Configuration

[](#configuration)

In your `.env` file, make sure you set a few configuration variables:

```
SCOUT_KEY=ABC0ZABCDEFGHIJKLMNOP
SCOUT_NAME="My Laravel App"
SCOUT_MONITOR=true

```

Your key can be found in the [Scout organization settings page](https://scoutapm.com/settings).

Documentation
-------------

[](#documentation)

For full installation and troubleshooting documentation, visit our [help site](https://docs.scoutapm.com/#laravel).

Support
-------

[](#support)

Please contact us at  or create an issue in this repo.

Capabilities
------------

[](#capabilities)

The Laravel library:

- Registers a service `\Scoutapm\ScoutApmAgent::class` into the container (useful for dependency injection)
- Provides a Facade `\Scoutapm\Laravel\Facades\ScoutApm`
- Wraps view engines to monitor view rendering times
- Injects several middleware for monitoring controllers and sending statistics to the Scout Core Agent
- Adds a listener to the database connection to instrument SQL queries

Custom Instrumentation
----------------------

[](#custom-instrumentation)

In order to perform custom instrumentation, you can wrap your code in a call to the `instrument` method. For example, given some code to be monitored:

```
$request = new ServiceRequest();
$request->setApiVersion($version);
```

Using the provided Facade for Laravel, you can wrap the call and it will be monitored.

```
// At top, with other imports
use Scoutapm\Events\Span\Span;
use Scoutapm\Laravel\Facades\ScoutApm;

// Replacing the above code
$request = ScoutApm::instrument(
    'Custom',
    'Building Service Request',
    static function (Span $span) use ($version) {
        $request = new ServiceRequest();
        $request->setApiVersion($version);
        return $request;
    }
);
```

Disclaimer
----------

[](#disclaimer)

This package is a fork from [bitlogicdev/scout-apm-laravel](https://github.com/bitlogicdev/scout-apm-laravel)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1985d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff1a81f5298656e2bb8ef189d81ce643cfba789d6fd950775ed65e7c26aa1c03?d=identicon)[magidmroueh](/maintainers/magidmroueh)

---

Top Contributors

[![magidmroueh](https://avatars.githubusercontent.com/u/1893444?v=4)](https://github.com/magidmroueh "magidmroueh (4 commits)")

---

Tags

laravelmonitoringperformanceapmdevelopment

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/magidmroueh-scout-apm-lumen/health.svg)

```
[![Health](https://phpackages.com/badges/magidmroueh-scout-apm-lumen/health.svg)](https://phpackages.com/packages/magidmroueh-scout-apm-lumen)
```

###  Alternatives

[scoutapp/scout-apm-laravel

Scout Application Performance Monitoring Agent - https://scoutapm.com

23831.3k](/packages/scoutapp-scout-apm-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[jackwh/laravel-new-relic

Monitor your Laravel application performance with New Relic

112827.2k](/packages/jackwh-laravel-new-relic)[scoutapp/scout-apm-php

Scout Application Performance Monitoring Agent - https://scoutapm.com

17877.0k5](/packages/scoutapp-scout-apm-php)

PHPackages © 2026

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