sobanvuex/php-newrelic
最新稳定版本:2.0.1
Composer 安装命令:
composer require sobanvuex/php-newrelic
包简介
PHP Library for New Relic Agent
README 文档
README
OOP Wrapper for NewRelic's PHP Agent.
Installation
To install, use composer:
composer require SobanVuex/php-newrelic:~2.0
Usage
Use the Agent directly or with your own DI with \SobanVuex\NewRelic\Agent.
Examples
Setting the application name
$newrelic = new SobanVuex\NewRelic\Agent('MyApp'); // or $newrelic = new SobanVuex\NewRelic\Agent('MyApp1;MyApp2'); // or $newrelic = new SobanVuex\NewRelic\Agent(['MyApp1', 'MyApp2']);
$newrelic = new SobanVuex\NewRelic\Agent(); $newrelic->setAppname('MyApp'); // or $newrelic->setAppname('MyApp1;MyApp2'); // or $newrelic->setAppname(['MyApp1', 'MyApp2']);
Mark a transaction as a background job
$newrelic = new SobanVuex\NewRelic\Agent(); $newrelic->backgroundJob(); // or $newrelic->backgroundJob(PHP_SAPI == 'cli');
Name a transaction
$newrelic = new SobanVuex\NewRelic\Agent(); $newrelic->nameTransaction('myController/myAction');
Testing
$ ./vendor/bin/phpunit
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 520.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 1
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-01-22