PHPackages                             marothyzsolt/laravel-new-relic - 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. marothyzsolt/laravel-new-relic

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

marothyzsolt/laravel-new-relic
==============================

Laravel Log Handler for New Relic

2.0.2(3y ago)04.0kMITPHPPHP ^8.0|^8.1

Since Aug 14Pushed 3y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (8)Used By (0)

Laravel New Relic Logger
========================

[](#laravel-new-relic-logger)

[![Latest Version on Packagist](https://camo.githubusercontent.com/49e1ddc2e16d8aa326b219e6f8a338cca4137cc9be362bbebf85034bfa1e8f15/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61726f7468797a736f6c742f6c61726176656c2d6e65772d72656c69632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marothyzsolt/laravel-new-relic)[![Total Downloads](https://camo.githubusercontent.com/766b59b08b4e268fcb03b7352ac31ea1eecbc37decc0f4790b54c1e7a55f6901/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61726f7468797a736f6c742f6c61726176656c2d6e65772d72656c69632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marothyzsolt/laravel-new-relic)

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

[](#installation)

You can install the package via composer:

```
composer require marothyzsolt/laravel-new-relic
```

Usage
-----

[](#usage)

Change `config/logging.php` file with the following code:

```
'single' => [
    'driver' => env('APP_ENV') === 'local' ? 'single' : 'custom',
    'via' => NewRelicLogger::class,
    'path' => storage_path('logs/laravel.log'),
    'level' => env('LOG_LEVEL', 'debug'),
],
```

You have to specify these the environment variables:

```
NEW_RELIC_APP_NAME="app-name"
NEW_RELIC_LICENSE_KEY="newrelic-license-key-here"
```

### Custom Extra Data

[](#custom-extra-data)

You can add more data to send to New Relic. Firstly publish the config file.

```
php artisan vendor:publish --provider="MarothyZsolt\LaravelNewRelic\LaravelNewRelicServiceProvider"
```

Now you see the config file structure, and you can extend the `Closure`.

```
'extra_data' => function (?Request $request, ?Throwable $throwable): array {
    return [
        'fingerprint' => $request->fingerprint(),
    ];
}
```

### Detailed Exception Logging (Optional)

[](#detailed-exception-logging-optional)

If you want to log exceptions with stacktrace as well, you can use the following. Extends the `app/Exceptions/Handler.php`

```
public function register()
{
    $this->reportable(function (Throwable $e) {
        app(\App\Logging\NewRelicLogger::class)->throwable($e);
    });
}
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Zsolt Marothy](https://github.com/marothyzsolt)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity61

Established project with proven stability

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 ~7 days

Total

7

Last Release

1327d ago

Major Versions

1.0.3 → 2.0.02022-09-18

### Community

Maintainers

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

---

Tags

laravel-new-relicmarothyzsolt

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/marothyzsolt-laravel-new-relic/health.svg)

```
[![Health](https://phpackages.com/badges/marothyzsolt-laravel-new-relic/health.svg)](https://phpackages.com/packages/marothyzsolt-laravel-new-relic)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[jackwh/laravel-new-relic

Monitor your Laravel application performance with New Relic

112827.2k](/packages/jackwh-laravel-new-relic)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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