Stars: 245
Forks: 24
Pull Requests: 3
Issues: 15
Watchers: 10
Last Updated: 2023-01-25 09:25:28
Laravel package to find performance bottlenecks in your laravel application.
License: MIT License
Languages: PHP, CSS, JavaScript, Blade
Laravel Meter monitors application performance for different things such as requests, commands, queries, events, etc and presents results in tables/charts. Think of it like Laravel Telescope but for performance monitoring.
Available options are:
Database connection to use for meter entries. Default: mysql (uses default connection)
Path to access meter UI. Default: meter
Username to access meter UI. Default: null
Password to access meter UI. Default: null
It helps to ignore the matched string in the query. Ex:
"ignore_matched_string" => [
"query" => [
"information_schema",
]
],
There are more options available, please check config/meter.php
file for more details.
Install via composer
composer require sarfraznawaz2005/meter
Publish package's config file by running below command:
php artisan vendor:publish --provider="Sarfraznawaz2005\Meter\MeterServiceProvider"
It should publish config/meter.php
config file and migration file.
Now run php artisan migrate
command to create meter_entries
database table.
Enable Meter in config/meter.php
and setup any other options as needed. Meter UI will be visible at path
config you set.
By default Meter monitors:
To monitor server stuff:
You should use meter:servermonitor
command. Schedule it in Laravel's console kernel file accordingly:
// app/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
$schedule->command('meter:servermonitor')->hourly(); // or daily
}
You can use username
and password
config options to setup basic HTTP authentication for Meter interface to be accessed. Once setup, user should provide correct username and password to access Meter page(s).
Alternatively, you can use middleware
config option to apply your own auth middleware, etc
You can use ignore_paths
and ignore_commands
config options to ignore desired pages or commands from being monitored by Meter.
You need to periodically remove meter data otherwise your database will turn big quickly. To prune meter data, you can setup prune command in Kernel file:
$schedule->command('meter:prune')->daily();
// or
$schedule->command('meter:prune --days=7')->daily();
PRs are welcome. Thanks
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Please see the license file for more information.