Giter VIP home page Giter VIP logo

newrelic's Introduction

NewRelic module for ZF2

NewRelic module provide an object-oriented PHP wrapper for New Relic monitoring service.

Build Status Latest Stable Version Coverage Status Scrutinizer Quality Score Dependencies Status

Introduction

NewRelic module provide a logger and a wrapper for New Relic PHP API.

The current route is used to set the name of each transaction. Moreover, the module allow exceptions logging if enabled.

Default configuration

<?php
return array(
    'newrelic' => array(
        // Sets the newrelic app name.  Note that this will discard metrics
        // collected before the name is set.  If empty then your php.ini
        // configuration will take precedence.
        'application_name' => null,
        // May be null and will only be set if application name is also given.
        'license' => null,
        // If false then neither change the auto_instrument or manually
        // instrument the real user monitoring.
        'browser_timing_enabled' => false,
        // When true tell the newrelic extension to insert Real User Monitoring
        // scripts automatically.
        'browser_timing_auto_instrument' => true,
        // When true, a logger with the newrelic writer will be called for
        // dispatch error events.
        'exceptions_logging_enabled' => false,
    ),
);

Usage

Ignore a transaction

<?php
$client = $this->getServiceLocator()->get('NewRelic\Client');
$client->ignoreTransaction();

Define if current transaction is a background job

<?php
$client = $this->getServiceLocator()->get('NewRelic\Client');
$client->backgroundJob(true);

Add custom metric

<?php
$client = $this->getServiceLocator()->get('NewRelic\Client');
$client->addCustomMetric('salesprice', $price);

newrelic's People

Contributors

bnkr avatar neeckeloo avatar socalnick avatar volkan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.