2017 © Pedro PelĂĄez
 

library metrics-bundle

Send metrics to StatsD Server.

image

nti/metrics-bundle

Send metrics to StatsD Server.

  • Monday, February 5, 2018
  • by ntidev
  • Repository
  • 2 Watchers
  • 0 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 14 % Grown

The README.md

MetricsBundle

StatsD Client, (*1)

Installation

  1. Install the bundle using composer:, (*2)

    $ composer require nti/metrics-bundle "dev-master"
    
  2. Add the bundle configuration to the AppKernel, (*3)

    ```php public function registerBundles() { $bundles = array( ... new NTI\MetricsBundle\NTIMetricsBundle(), ... ); }, (*4)

  3. Setup the configuration in the config.yml, (*5)

# NTI Metrics
nti_metrics:
    host: "statsDserver" # default: localhost
    port: 8125           # default: 8125
    prefix: "greenlink." # default: ""

Usage

  1. Get the Metrics Client service
$collector = $container->get('nti.metrics');

The following methods are available for send metrics:, (*6)

$collector->increment('glbs.email.send');            # Same as send "glbs.email.send:1|c"
$collector->decrement('glbs.email.send');            # Same as send "glbs.email.send:-1|c"

To send the values to statsD server you have to call the following method:, (*7)

$collector->flush();

The Versions

05/02 2018

dev-master

9999999-dev

Send metrics to StatsD Server.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Héctor Ventura

statsd metricsbundle