exolnet / laravel-instruments
Module to track Laravel metrics with Statsd.
Requires
- php: ^8.1
- laravel/framework: ^10.0|^11.0
- league/statsd: 1.3.*
Requires (Dev)
- exolnet/phpcs-config: ^2.0
- illuminate/contracts: ^10.0|^11.0
- mockery/mockery: ^1.4
- orchestra/testbench: ^8.0|^9.0
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-11-28 16:05:50 UTC
README
This project aim to easily add metric tracking to your Laravel 5 applications. Three drivers are currently supported: StatsD, Log and Null. The following metrics are currently tracked:
- Request
- Response
- Browser timing (first byte, ready and load)
- SQL Queries
- Authentifications
- Queue
- Cache
Installation
Require this package with composer:
composer require eXolnet/laravel-instruments
After updating composer, add the ServiceProvider to the providers array in config/app.php
:
Exolnet\Instruments\InstrumentsServiceProvider::class
Configure the library through your .env
file:
INSTRUMENTS_DRIVER=statsd
STATSD_HOST=127.0.0.1
STATSD_PORT=8125
Or publish the package configuration with the following command:
$ php artisan vendor:publish --provider="Exolnet\Instruments\InstrumentsServiceProvider"
Testing
To run the phpUnit tests, please use:
$ composer test
Contributing
Please see CONTRIBUTING and CODE OF CONDUCT for details.
Security
If you discover any security related issues, please email security@exolnet.com instead of using the issue tracker.
Credits
License
This code is licensed under the MIT license. Please see the license file for more information.