No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.editorconfig
.styleci.yml
CHANGELOG.md
CONDUCT.md
CONTRIBUTING.md
LICENSE.md
README.md
composer.json

README.md

StatsCollector

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Just a small Laravel5 wrapper over Domnikl\Statsd to send data to StatsD/Graphite really easily.

Install

Via Composer

$ composer require jhmilan/StatsCollector

Setup

Add the service provider to your config.app.php

Jhmilan\StatsCollector\ServiceProvider::class,

Add the facade to your config.app.php

'StatsCollector' => Jhmilan\StatsCollector\Facades\StatsCollector::class,

Publish the config file (a new config/statscollector.php file will be created, populate your .env as per the variables in the file)

php artisan vendor:publish --provider="Jhmilan\StatsCollector\StatsCollectorServiceProvider"

Usage

Send timers, countes, etc just calling a method! (see /src/Services/StatsD.php to figure out which methods are available)

echo StatsCollecor::time('foo.bar', 300);
...

Add this middleware to your App Middleware to auto collect (config based), request time, request memory usage and request DB operations

Jhmilan\StatsCollector\Http\Middleware\CollectorMiddleware

To-do

This package is still WIP, no time for tests or good docs yet! sorry

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email jhmilan@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.