Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.
/ newrelic Public archive
forked from In-Touch/newrelic

Composer Package for NewRelic Wrapper

Notifications You must be signed in to change notification settings

Webeleven/newrelic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

githalytics.com alpha

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.

###Installation Add intouch/newrelic to your composer requirements:

"require": {
    "intouch/newrelic": ">=1.0.2"
}

###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.

About

Composer Package for NewRelic Wrapper

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%