PHPackages                             customergauge/logstash - 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. customergauge/logstash

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

customergauge/logstash
======================

APM &amp; Logging for Laravel powered by Logstash

4.0.0(1y ago)333.2k↓40.6%1MITPHPPHP &gt;=8.2

Since Dec 2Pushed 1y ago10 watchersCompare

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

READMEChangelog (10)Dependencies (8)Versions (25)Used By (0)

Laravel Logstash APM 📋
======================

[](#laravel-logstash-apm-)

This library adapts Monolog for Laravel to communicate with Logstash for logging &amp; metrics.

Installation
============

[](#installation)

```
composer require customergauge/logstash
```

Usage
=====

[](#usage)

### Logs

[](#logs)

In the `logging.php`, define a custom channel for Laravel

```
'http' => [
    'driver' => 'custom',
    'via' => LogstashLoggerFactory::class,
    'address' => sprintf('tcp://%s:9601', env('LOGSTASH_ADDRESS')),
    'processor' => env('LOGSTASH_PROCESSOR'),
],
```

This will instruct Laravel to write any log to Logstash using a TCP connection on port 9601. TCP will guarantee log delivery. Processors allow to manipulate the `$record` array that gets sent to Logstash as JSON. The `processor` attribute accept `http` or `queue`values.

### Metrics

[](#metrics)

The library also allows to collect application metrics using an `apm` configuration inside the `logging.php` file.

```
    'apm' => [
        'enable' => env('LOGSTASH_APM_ENABLE', true),
        'address' => sprintf('udp://%s:9602', env('LOGSTASH_ADDRESS')),
    ],
```

For metrics, the above configuration will instruct Laravel to use an UDP conncetion as a way to fire-and-forget. Delivery is not guaranteed, but code execution is not delayed by acknowledging metric delivery.

### Processors

[](#processors)

You may configure Http and Queue processors. Processors must implement the `\CustomerGauge\Logstash\Processors\HttpProcessorInterface`or the `\CustomerGauge\Logstash\Processors\QueueProcessorInterface`. They offer the chance to modify the `$record` that will be streamed to Logstash by using the `ProcessorInterface` system provided by Monolog.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 94.3% 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 ~62 days

Recently: every ~220 days

Total

22

Last Release

693d ago

Major Versions

1.x-dev → 2.0.02021-02-15

2.1.1 → 3.0.02021-06-04

3.7.0 → 4.0.02024-06-24

PHP version history (3 changes)1.0.0PHP ^7.3

1.1.0PHP &gt;=7.3

4.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0325707319c1497846deddeb429fef8d7510c299c2e764d7e5a05b198fcb4d28?d=identicon)[Deleu](/maintainers/Deleu)

---

Top Contributors

[![deleugpn](https://avatars.githubusercontent.com/u/9533181?v=4)](https://github.com/deleugpn "deleugpn (66 commits)")[![abdala](https://avatars.githubusercontent.com/u/219340?v=4)](https://github.com/abdala "abdala (4 commits)")

---

Tags

laravelelasticsearchapmtcpSocketudplogstash

### Embed Badge

![Health badge](/badges/customergauge-logstash/health.svg)

```
[![Health](https://phpackages.com/badges/customergauge-logstash/health.svg)](https://phpackages.com/packages/customergauge-logstash)
```

###  Alternatives

[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[arkaitzgarro/elastic-apm-laravel

Laravel APM agent for Elastic v2 intake API

84433.6k](/packages/arkaitzgarro-elastic-apm-laravel)[scoutapp/scout-apm-laravel

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

23831.3k](/packages/scoutapp-scout-apm-laravel)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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