dev-master
9999999-devSend metrics to StatsD Server.
MIT
The Requires
- php >=5.6
The Development Requires
by Héctor Ventura
statsd metricsbundle
Wallogit.com
2017 © Pedro PelĂĄez
Send metrics to StatsD Server.
StatsD Client, (*1)
Install the bundle using composer:, (*2)
$ composer require nti/metrics-bundle "dev-master"
Add the bundle configuration to the AppKernel, (*3)
```php public function registerBundles() { $bundles = array( ... new NTI\MetricsBundle\NTIMetricsBundle(), ... ); }, (*4)
Setup the configuration in the config.yml, (*5)
# NTI Metrics
nti_metrics:
host: "statsDserver" # default: localhost
port: 8125 # default: 8125
prefix: "greenlink." # default: ""
$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();
Send metrics to StatsD Server.
MIT
statsd metricsbundle