dev-master
9999999-devLightweight PHP client for NewRelic.
MIT
The Development Requires
1.0
1.0.0.0Lightweight PHP client for NewRelic.
MIT
The Development Requires
Lightweight PHP client for NewRelic.
Lightweight PHP client for NewRelic., (*2)
Install this package with Composer., (*3)
composer require pep/php-newrelic
Demonstrating a simple method call, the method calls can be anything as long as they appear in NewRelic
's API. You can format the functions however you want, with the newrelic_
part discarded. So NewRelic::NoticeError
, NewRelic::notice_error
will both work, use it however you like., (*4)
<?php require_once 'vendor/autoload.php'; use Pep\NewRelic; NewRelic::noticeError('Testing PHP client for NewRelic');
If the NewRelic
PHP agent is not loaded, the function will die gracefully without exceptions. So you can run the functions without checks in your development environment., (*5)
If you're trying to call a function that does not exist, it will throw the Pep\NewRelic\MethodNotFoundException
exception., (*6)
<?php require_once 'vendor/autoload.php'; use Pep\NewRelic; use Pep\NewRelic\MethodNotFoundException as NewRelicMethodNotFoundException; try { NewRelic::thisMethodDoesNotExist('Testing PHP client for NewRelic'); } catch (NewRelicMethodNotFoundException $e) {}
Lightweight PHP client for NewRelic.
MIT
Lightweight PHP client for NewRelic.
MIT