pep/php-newrelic
最新稳定版本:1.0
Composer 安装命令:
composer require pep/php-newrelic
包简介
Lightweight PHP client for NewRelic.
README 文档
README
PHP NewRelic
Lightweight PHP client for NewRelic.
Installation
Install this package with Composer.
composer require pep/php-newrelic
Usage
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.
<?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.
If you're trying to call a function that does not exist, it will throw the Pep\NewRelic\MethodNotFoundException exception.
<?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) {}
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-10