2017 © Pedro Peláez
 

library laravel-statsd

Send to Statsd server from Laravel

image

spiria-digital/laravel-statsd

Send to Statsd server from Laravel

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Allows you to seamlessly send data to a Statsd server from within your Laravel application., (*1)

Packagist License Build Status, (*2)

Installation

Add Spiria-Digital\laravel-statsd package with composer, (*3)

composer require Spiria-Digital/laravel-statsd:5.5.1

Update your packages with composer update or install with composer install., (*4)

Laravel >5.5, (*5)

Since version 5.5, Laravel support Package Auto-Discovery, which means that Service Provider and aliases can be added automatically through the package composer file. Therefore, once Composer has installed or updated your packages Laravel-Statsd should be registered as a service provider and should provide the Statsd Facade., (*6)

Laravel <5.4, (*7)

If you are using an older verison of Laravel you must add the provider and the alias manually., (*8)

You can register Statsd with Laravel by opening up app/config/app.php and adding the providers key in the providers array:, (*9)

'Spiria-Digital\Statsd\StatsdServiceProvider'

You will also need to register the facade so that you can access it within your application. To do this add the following to your aliases in app/config/app.php:, (*10)

'Statsd' => 'Spiria-Digital\Statsd\Facades\Statsd'

Configuration

Statsd configuration file can be extended by creating app/config/statsd.php. You can find the default configuration file under vendor/Spiria-Digital/laravel-statsd/config/config.php., (*11)

You can quickly publish a configuration file by running the following Artisan command., (*12)

$ php artisan config:publish Spiria-Digital/laravel-statsd

Usage

Laravel-Statsd exposes the following functions to send data to Statsd:, (*13)

Statsd::timing($key, $time);
Statsd::gauge($key, $value);
Statsd::set($key, $value);
Statsd::increment($key);
Statsd::decrement($key);
Statsd::updateCount($key, $delta);

The data is automatically sent to Statsd at the end of Laravels life-cycle, but you can force data to be sent with:, (*14)

Statsd::send()

Note: Data will only be sent to Statsd if your environment matches the environments defined in the config file., (*15)

This package is an updated version of rcrowe/laravel-statsd and has been tested with laravel 5.4+ only. It does not currently support Lumen., (*16)

The Versions

30/10 2017

dev-master

9999999-dev

Send to Statsd server from Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel statsd

30/10 2017

v5.5.1

5.5.1.0

Send to Statsd server from Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel statsd

30/10 2017

v5.5.x-dev

5.5.9999999.9999999-dev

Send to Statsd server from Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel statsd

13/11 2013

v0.5.2

0.5.2.0

Send to Statsd server from Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel statsd

17/07 2013

v0.5.1

0.5.1.0

Send to Statsd server from Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel statsd

20/06 2013

v0.5.0

0.5.0.0

Send to Statsd server from Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel statsd

19/03 2013

v0.0.2

0.0.2.0

Send to Statsd server from Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel statsd

24/01 2013

v0.0.1

0.0.1.0

Send to Statsd server from Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel statsd