PHPackages                             kamilersz/laravel-apm - 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. kamilersz/laravel-apm

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

kamilersz/laravel-apm
=====================

Application monitoring for Laravel

01Blade

Since Dec 3Pushed 1y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel APM
===========

[](#laravel-apm)

Monitor requests/cron/queue execution times in production.

If you have a question:

- which pages have the slowest loading time?
- which page to optimize to reduce the server load?

Then this package is for you.

[![](https://camo.githubusercontent.com/ac8a8df2621451ebc44f978e0aac3bdffbfce971f6c316116f17fff74581be57/68747470733a2f2f692e696d6775722e636f6d2f795066516965682e706e67)](https://camo.githubusercontent.com/ac8a8df2621451ebc44f978e0aac3bdffbfce971f6c316116f17fff74581be57/68747470733a2f2f692e696d6775722e636f6d2f795066516965682e706e67)

Installation
------------

[](#installation)

Supported Laravel versions: 8 ... 11+

```
composer require kamilersz/laravel-apm

```

Add route to your routes/web.php file (don't forget securing it from unwanted visitors)

```
Route::get('/apm', '\Done\LaravelAPM\ApmController@index')->name('apm');
```

Daily clear log files by adding scheduled job to App/Console/Kernel.php

```
$schedule->command('apm:clear')->daily();

```

Why?
----

[](#why)

Laravel APM can show pages that have the biggest impact on the server load. When you are developing the website, it is hard to tell which pages will receive the most pageviews and which will use the most resources: (per page resource usage) x (pageviews) = (this package stats)

Running this package in production has minimal impact on server load.

Technical
---------

[](#technical)

This package logs every user request to a file (storage/app/apm/apm-2020-01-01.txt). On average logging adds an overhead of less than 1 ms to each request (0.001 second).

Customizations
--------------

[](#customizations)

Copy /vendor/kamilersz/laravel-apm/config/apm.php file to /config/apm.php Then edit /config/apm.php values to your liking.

```
return [
    'enabled' => env('APM', true),
    'per_page' => 100, // how many results per page to show
    'sampling' => 1, // logs only part of requests. 1 - 100%, 0.1 - 10% of requests.
    'slow' => 5, // log queries of pages that spent in SQL more than 10 seconds
];
```

Recommendations
---------------

[](#recommendations)

If you are using Closures for scheduler, it is recommended to add -&gt;setName('some-name');, to be able to distinguish different Closures in APM logs.

```
$schedule->call(function () {
    DB::table('recent_users')->delete();
})->daily()->setName('some-name'); // add ->setName()
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/83722c3de415bf8bc529584f50bb586b182d72660316315e7e9fe41d60429918?d=identicon)[kamilersz](/maintainers/kamilersz)

---

Top Contributors

[![mantas-done](https://avatars.githubusercontent.com/u/17127206?v=4)](https://github.com/mantas-done "mantas-done (40 commits)")[![kamilersz](https://avatars.githubusercontent.com/u/2652633?v=4)](https://github.com/kamilersz "kamilersz (3 commits)")

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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