rcrowe/laravel-statsd is a Laravel package for send to statsd server from laravel.
It currently has 22 GitHub stars and 50.358 downloads on Packagist (latest version v0.5.2).
Install it with composer require rcrowe/laravel-statsd.
Discover more Laravel packages by rcrowe
or browse all Laravel packages to compare alternatives.
Last updated
Allows you to seamlessly send data to a Statsd server from within your Laravel application.
Add rcrowe\laravel-statsd as a requirement to composer.json:
{
"require": {
"rcrowe/laravel-statsd": "0.5.*"
}
}
Update your packages with composer update or install with composer install.
Once Composer has installed or updated your packages you need to register Statsd with Laravel itself. Open up app/config/app.php and find the providers key towards the bottom and add:
'rcrowe\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:
'Statsd' => 'rcrowe\Statsd\Facades\Statsd'
Statsd configuration file can be extended by creating app/config/packages/rcrowe/laravel-statsd/config.php. You can find the default configuration file at vendor/rcrowe/laravel-statsd/src/config/config.php.
You can quickly publish a configuration file by running the following Artisan command.
$ php artisan config:publish rcrowe/laravel-statsd
Laravel-Statsd exposes the following functions to send data to Statsd:
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:
Statsd::send()
Note: Data will only be sent to Statsd if your environment matches the environments defined in the config file.
Get paid by clients abroad
Wise gives you local bank details in several currencies and converts at the mid-market rate. Useful when your invoices are not in your own currency.
Try WiseNew Laravel packages worth a look, once a month. No spam, one-click unsubscribe.