PHPackages                             mir-insight/cakephp-newrelic - 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. mir-insight/cakephp-newrelic

ActiveCakephp-plugin[Logging &amp; Monitoring](/categories/logging)

mir-insight/cakephp-newrelic
============================

CakePHP 5 NewRelic Integration

2.0.4(1y ago)0525↓91.7%MITPHPPHP &gt;=8.1

Since May 23Pushed 1y agoCompare

[ Source](https://github.com/Mir-Insight/cakephp-newrelic)[ Packagist](https://packagist.org/packages/mir-insight/cakephp-newrelic)[ Docs](https://github.com/mir-insight/cakephp-newrelic)[ RSS](/packages/mir-insight-cakephp-newrelic/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (3)Versions (8)Used By (0)

CakePHP NewRelic Plugin
=======================

[](#cakephp-newrelic-plugin)

A CakePHP 5 plugin for NewRelic integration that provides automatic transaction tracking, error reporting, and custom metrics.

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

[](#requirements)

- PHP 8.1 or higher
- CakePHP 5.0 or higher
- NewRelic PHP extension

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).

```
composer require mir-insight/cakephp-newrelic
```

Configuration
-------------

[](#configuration)

1. Load the plugin in your `config/bootstrap.php`:

```
// Load the plugin
$app->addPlugin('NewRelic');
```

2. Configure the plugin in your `config/app.php` or create a new file `config/newrelic.php`:

```
return [
    'NewRelic' => [
        'enabled' => true,
        'appName' => 'My Application',
        'captureParams' => true,
        'customParameters' => [
            'environment' => 'production',
            'version' => '1.0.0',
        ],
    ],
];
```

Usage
-----

[](#usage)

The plugin automatically integrates with your CakePHP application and provides the following features:

1. Automatic transaction tracking for all HTTP requests
2. Exception tracking
3. Custom parameter and metric tracking
4. Custom tracer methods

### Using the NewRelic Service

[](#using-the-newrelic-service)

You can access the NewRelic service in your controllers, components, or other services:

```
use NewRelic\Service\NewRelicServiceInterface;

class MyController extends AppController
{
    public function index(NewRelicServiceInterface $newRelic)
    {
        // Add custom parameters
        $newRelic->addCustomParameter('user_id', $this->Auth->user('id'));

        // Add custom metrics
        $newRelic->addCustomMetric('custom/feature_usage', 1.0);

        // Record exceptions
        try {
            // Your code here
        } catch (\Throwable $e) {
            $newRelic->recordException($e);
            throw $e;
        }
    }
}
```

### Custom Tracers

[](#custom-tracers)

You can add custom tracer methods in your configuration:

```
return [
    'NewRelic' => [
        'customTracers' => [
            'App\Model\Table\UsersTable::findActive',
            'App\Service\CacheService::get',
        ],
    ],
];
```

Features
--------

[](#features)

- Automatic transaction tracking
- Exception tracking
- Custom parameter tracking
- Custom metric tracking
- Custom tracer methods
- Middleware integration
- Service container integration
- Configuration options

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

[](#contributing)

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

License
-------

[](#license)

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

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance46

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

5

Last Release

417d ago

Major Versions

1.0.0 → 2.0.02025-04-30

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/196306183?v=4)[Miguel Enes](/maintainers/miguelenes1985)[@miguelenes1985](https://github.com/miguelenes1985)

---

Top Contributors

[![jippi](https://avatars.githubusercontent.com/u/22841?v=4)](https://github.com/jippi "jippi (12 commits)")[![miguelenes](https://avatars.githubusercontent.com/u/1568086?v=4)](https://github.com/miguelenes "miguelenes (6 commits)")[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (4 commits)")[![miguelenes1985](https://avatars.githubusercontent.com/u/196306183?v=4)](https://github.com/miguelenes1985 "miguelenes1985 (4 commits)")[![kimegede](https://avatars.githubusercontent.com/u/870013?v=4)](https://github.com/kimegede "kimegede (2 commits)")[![Spriz](https://avatars.githubusercontent.com/u/3512268?v=4)](https://github.com/Spriz "Spriz (1 commits)")[![caicedodavid](https://avatars.githubusercontent.com/u/9204693?v=4)](https://github.com/caicedodavid "caicedodavid (1 commits)")

---

Tags

plugincakephpapmnewrelic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mir-insight-cakephp-newrelic/health.svg)

```
[![Health](https://phpackages.com/badges/mir-insight-cakephp-newrelic/health.svg)](https://phpackages.com/packages/mir-insight-cakephp-newrelic)
```

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

333972.2k49](/packages/dereuromark-cakephp-tools)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

131237.3k13](/packages/dereuromark-cakephp-tinyauth)[dereuromark/cakephp-setup

A CakePHP plugin containing lots of useful management tools

35184.7k2](/packages/dereuromark-cakephp-setup)[lordsimal/cakephp-sentry

Sentry plugin for CakePHP

12299.8k](/packages/lordsimal-cakephp-sentry)[dereuromark/cakephp-databaselog

A CakePHP plugin for storing and viewing application logs in the database

44170.0k2](/packages/dereuromark-cakephp-databaselog)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

3096.0k5](/packages/dereuromark-cakephp-dto)

PHPackages © 2026

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