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

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

jippi/cakephp-newrelic
======================

CakePHP &lt;3 NewRelic

12341.6k↓17.6%12[2 PRs](https://github.com/jippi/cakephp-newrelic/pulls)PHP

Since Jul 28Pushed 6y ago3 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

CakePHP &lt;3 NewRelic
======================

[](#cakephp-3-newrelic)

You can modify your files like this

Things included
---------------

[](#things-included)

- NewRelic.NewRelic task
- NewRelic.NewRelic component
- NewRelicTrait trait
- NewRelic.NewRelic

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

[](#installation)

```
composer require jippi/cakephp-newrelic

```

### Console

[](#console)

Include this snippet in `app/Console/AppShell.php`

```
	public function startup() {
		$this->NewRelic = $this->Tasks->load('NewRelic.NewRelic');
		$this->NewRelic->setName($this);
		$this->NewRelic->start();
		$this->NewRelic->parameter('params', json_encode($this->params));
		$this->NewRelic->parameter('args', json_encode($this->args));

		parent::startup();
	}
```

### Controller

[](#controller)

Simply add `NewRelic.NewRelic` to your `$components` list

app/webroot/index.php
---------------------

[](#appwebrootindexphp)

Add this in top of your file before `define('DS', 'DIRECTORY_SEPARATOR')`

```
