Skip to content
Composer Package for NewRelic Wrapper
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add styleCI and php codesniffer Jan 26, 2019
.gitattributes Export-ignore .style-ci.yml Jan 27, 2019
.gitignore Enhancement: Require phpunit/phpunit as a dev dependency Sep 22, 2015
.travis.yml Add coveralls, update to phpunit 6.x Jan 27, 2019 Prepare release v2.0.0 Jan 26, 2019
phpunit.xml Fix: Whitelist src directory Sep 23, 2015

Build Status Coveralls Latest Version on Packagist Total Downloads StyleCI

NewRelic PHP Agent API Wrapper

This is simply a pass-through wrapper to the NewRelic PHP Agent API in a namespaced class available via composer. No magic here.



$ composer require intouch/newrelic

Basic Use

The most basic use is to simple include the class:

use Intouch\Newrelic\Newrelic;

$newrelic = new Newrelic();

This will load the class and, if the NewRelic agent is installed, give you access to the API. If the agent is not installed, it will simply act as a pass-through and return false from all methods.

If you want some notification if the NewRelic agent cannot be loaded, pass true to the constructor:

use Intouch\Newrelic\Newrelic;

$newrelic = new Newrelic(true);

If the agent API is not found, this will now throw a RuntimeException.

You can’t perform that action at this time.