PHPackages                             brunitto/cakephp-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. brunitto/cakephp-new-relic

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

brunitto/cakephp-new-relic
==========================

CakePHP New Relic plugin.

1.3.1(7y ago)536.8k↓50%3[1 issues](https://github.com/brunitto/cakephp-new-relic/issues)MITPHP

Since Feb 16Pushed 7y ago3 watchersCompare

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

READMEChangelogDependencies (3)Versions (10)Used By (0)

CakePHP NewRelic
================

[](#cakephp-newrelic)

CakePHP New Relic plugin.

Build status
------------

[](#build-status)

[![Build Status](https://camo.githubusercontent.com/355f6c0423e9a6a9ca7280341f4ae4f025ecdb3c75e52bf76c82ea1eef096dc0/68747470733a2f2f7472617669732d63692e6f72672f6272756e6974746f2f63616b657068702d6e65772d72656c69632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/brunitto/cakephp-new-relic)

Overview
--------

[](#overview)

This plugin extends the [CakePHP Request cycle](http://book.cakephp.org/3.0/en/intro.html#cakephp-request-cycle), adding a specialized [Dispatcher Filter](book.cakephp.org/3.0/en/development/dispatch-filters.html) that adds support for New Relic. The current version supports:

- Name transactions
- Browser timing

For more information, visit:

[PHP Frameworks: Integrating support for New Relic](https://docs.newrelic.com/docs/agents/php-agent/frameworks-libraries/php-frameworks-integrating-support-new-relic)

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

[](#requirements)

This plugin has the following requirements:

- CakePHP 3.6 or greater
- PHP 7.1 or greater
- New Relic PHP extension

Development requirements:

- PHPUnit 7.1 or greater

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

[](#installation)

Install the plugin using [Composer](https://getcomposer.org/), executing the following command in your project's root directory (where the `composer.json`file is located.)

```
composer require brunitto/cakephp-new-relic

```

Usage
-----

[](#usage)

### Enable name transaction

[](#enable-name-transaction)

#### Using Dispatcher

[](#using-dispatcher)

Add the Dispatcher Filter to the `bootstrap.php` file:

```
// New Relic name transaction dispatcher filter
DispatcherFactory::add('NewRelic.NameTransaction');

```

#### Using Middleware

[](#using-middleware)

Add the Middleware to the `src/Application.php` file **after** the `RoutingMiddleware`:

```
$middlewareQueue
    ->add(new RoutingMiddleware($this))
    ->add(new NameTransactionMiddleware());

```

### Enable browser timing

[](#enable-browser-timing)

Load the plugin helper within `src/View/AppView.php`, add the following line within the `initialize()` method:

```
$this->loadHelper('NewRelic.NewRelic');

```

Like this:

```
public function initialize()
{
    parent::initialize();
    $this->loadHelper('NewRelic.NewRelic');
}

```

In your [Layouts](http://book.cakephp.org/3.0/en/views.html#layouts) files, use the `NewRelic` helper methods to get the browser timing header and footer.

The header goes right before the `` element:

```

...

```

And the footer goes right before the `` element:

```

...

```

Middleware support
------------------

[](#middleware-support)

This plugin is ready for Middleware, as defined in:

[Middleware](https://book.cakephp.org/3.0/en/controllers/middleware.html)

Development guidelines
----------------------

[](#development-guidelines)

### Install dependencies

[](#install-dependencies)

Install using `composer` program:

```
$ composer install --ignore-platform-reqs

```

### Running tests

[](#running-tests)

Run using `phpunit` program:

```
$ vendor/bin/phpunit tests --color

```

### Releasing a new version

[](#releasing-a-new-version)

1. Plan a release on GitHub, using Semantic Versioning, defining which issues will be on this release
2. Checkout to `development` and merge `master`, starting from the last stable version
3. Work in `development`, commiting and pushing to `origin` when you have working code. This will trigger Travis CI and run tests as soon as possible. If you fix an issue, use the `, fix #N` suffix in commit messages, where #N is the issue identifier. This will close issues on GitHub
4. When the `development` is ready to go, merge in `master` and creates two soft tags: the version tag `1.2.3` and the `stable` tag. It might be necessary to remove the `stable` tag before pushing. The version tag is used by GitHub and Packagist to define a new release and a stable release
5. Push `master` to `origin` including the tags and wait for Travis CI to run and the tests to pass

Issues
------

[](#issues)

If you have some problem with this plugin, please open an issue on:

Contribute
----------

[](#contribute)

If you'd like to contribute, you can fork the project, add features and send pull requests in the official repository:

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~122 days

Recently: every ~133 days

Total

8

Last Release

2879d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54373?v=4)[Bruno Moyle](/maintainers/brunitto)[@brunitto](https://github.com/brunitto)

---

Top Contributors

[![brunitto](https://avatars.githubusercontent.com/u/54373?v=4)](https://github.com/brunitto "brunitto (40 commits)")[![rodrigorm](https://avatars.githubusercontent.com/u/23070?v=4)](https://github.com/rodrigorm "rodrigorm (2 commits)")[![voycey](https://avatars.githubusercontent.com/u/1065098?v=4)](https://github.com/voycey "voycey (2 commits)")[![alysson-azevedo](https://avatars.githubusercontent.com/u/2701975?v=4)](https://github.com/alysson-azevedo "alysson-azevedo (1 commits)")

---

Tags

cakephpnewrelicphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brunitto-cakephp-new-relic/health.svg)

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

###  Alternatives

[lordsimal/cakephp-sentry

Sentry plugin for CakePHP

12270.3k](/packages/lordsimal-cakephp-sentry)

PHPackages © 2026

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