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

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

jeremyharris/cakephp-newrelic
=============================

New Relic is a plugin for CakePHP that makes transactions more useful

1146.8k↓38.6%2PHP

Since Nov 25Pushed 10y ago4 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

[![build status](https://camo.githubusercontent.com/1fdcea6f939b9eb125454e64c7d8783ed9c068fc289e91e1c9ea050ec8370622/68747470733a2f2f7472617669732d63692e6f72672f6a6572656d796861727269732f63616b657068702d6e657772656c69632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jeremyharris/cakephp-newrelic)

CakePHP New Relic Plugin
========================

[](#cakephp-new-relic-plugin)

The New Relic plugin is a CakePHP plugin that makes your \[New Relic\] () transactions easier to read and understand. It also gives you better flexibility in ignoring certain transactions (e.g., admin panels). By default, New Relic transactions are based on the file name and are hard to read. This plugin organizes them using basic routes, that is, a transaction for:

```
/posts/edit/2

```

is placed in the following New Relic transaction:

```
/posts/edit

```

This allows you to dig down into issues regarding certain actions, rather than based on filenames. To aggregate based on action, parameters are also ignored.

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

[](#requirements)

- CAKEPHP 2.0+
- A New Relic Account
- The New Relic agent on your server (enabled)

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

[](#installation)

### Manual

[](#manual)

- Download this:
- Unzip that download.
- Copy the resulting folder to app/Plugin/NewRelic/

### GIT Submodule

[](#git-submodule)

In your app directory type:

```
git submodule add git://github.com/jeremyharris/cakephp-newrelic.git Plugin/NewRelic
git submodule update --init

```

### Composer

[](#composer)

Ensure `require` is present in `composer.json`. This will install the plugin into Plugin/NewRelic:

```
{
    "require": {
        "jeremyharris/cakephp-newrelic": "dev-master"
    }
}

```

Usage
-----

[](#usage)

Load the plugin:

```
CakePlugin::loadAll(); // or CakePlugin::load('NewRelic');

```

Add the following filter to your Dispatch filters (in `bootstrap.php):

```
Configure::write('Dispatcher.filters', array(
    'AssetDispatcher', //default
    'CacheDispatcher', //default
    'NewRelic.NewRelicFilter'
));

```

Transactions will now be named by basic routes, that is, `:controller/:action`.

### Change the application name

[](#change-the-application-name)

Add the application name (in `bootstrap.php):

```
Configure::write('NewRelic.appName', 'My App Name');

```

### Ignoring transactions

[](#ignoring-transactions)

Sometimes you don't want to report something to New Relic. Things like importing take a while, and can mess up your averages. Admin panels are also an example of something you may not want to report to New Relic. You can ignore transactions based on routes like so:

```
Configure::write('NewRelic.ignoreRoutes', array(
     '/admin/:controller/:action/*',
     '/users/import'
));

```

`NewRelic.ignoreRoutes` uses the Routing system, so use them as you would connecting a route in your `routes.php` file.

### Real User Monitoring (RUM)

[](#real-user-monitoring-rum)

If you want to use New Relic's RUM, there's a little helper that let's you do that. Add the helper to your controller:

```
public $helpers = array(
    'NewRelic.NewRelic'
);

```

Then add the following to your layout:

```

  ...

  ...

```

License
-------

[](#license)

Copyright (c) Jeremy Harris

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e2fcf5bb870eab1f8efd260dfa93fb00961d1c6addc787a93bf0b5d84c78524?d=identicon)[jeremyharris](/maintainers/jeremyharris)

---

Top Contributors

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

### Embed Badge

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

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

###  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)[ekino/newrelic-bundle

Integrate New Relic into Symfony2

28111.2M8](/packages/ekino-newrelic-bundle)

PHPackages © 2026

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