li3_newrelic
New Relic plugin for Lithium PHP applications., (*1)
, (*2)
Installation
Composer
~~~ json
{
"require": {
...
"mdx-dev/li3_newrelic": "dev-master"
...
}
}, (*3)
~~~ bash
php composer.phar install
Submodule
~~~ bash
git submodule add git://github.com/mdx-dev/li3_newrelic.git libraries/li3_newrelic, (*4)
### Clone Directly
~~~ bash
git clone git://github.com/mdx-dev/li3_newrelic.git libraries/li3_newrelic
Setting up
If you do not provide a shouldRun
key a generic closure will be provided identical to the example below., (*5)
~~~ php
function() {
return Environment::is('production') && extension_loaded('newrelic');
}
));
// ...
?>, (*6)
## Usage
The `Newrelic` extension puts an OO wrapper around their built in function calls so calling `Newrelic::notice_error` calls `newrelic_notice_error`. Here is an available list of [php newrelic functions](https://newrelic.com/docs/php/the-php-api).
~~~ php