pep/php-newrelic 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pep/php-newrelic

最新稳定版本:1.0

Composer 安装命令:

composer require pep/php-newrelic

包简介

Lightweight PHP client for NewRelic.

README 文档

README

Build Status

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-10