2017 © Pedro Peláez
 

library php-newrelic

Lightweight PHP client for NewRelic.

image

pep/php-newrelic

Lightweight PHP client for NewRelic.

  • Friday, July 10, 2015
  • by PepijnSenders
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

PHP NewRelic

Lightweight PHP client for NewRelic., (*2)

Installation

Install this package with Composer., (*3)

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., (*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) {}

The Versions

10/07 2015

dev-master

9999999-dev

Lightweight PHP client for NewRelic.

  Sources   Download

MIT

The Development Requires

10/07 2015

1.0

1.0.0.0

Lightweight PHP client for NewRelic.

  Sources   Download

MIT

The Development Requires