composer require stryber/laravel-metrics
You can publish the config files with the following command:
php artisan vendor:publish --tag="stryber-mectrics"
Check examples folder for:
For now package supports 1 driver - influxdb and collects 3 metrics - Command, Request and Query.
Command and Query metrics will be collected automatically after you install the package.
To make Request metrics work you have to enable middleware called
Feel free to add your own metric classes to collect metrics in your project.
For this you should extend
\Stryber\Metrics\Collectables\Metric class and, if you're using influxdb, make
\Stryber\Metrics\Drivers\Influx\Transformers\Transformer based on your needs.
If so, don't forget to add your transformer's resolver to config.
If you want to fill metric's storage with some data don't use laravel test setup.
Based of current state of
stryber/laravel-uuid-helper and laravel test request realization you will have all
metrics with the same request-id.