add updates

This commit is contained in:
2024-09-01 18:40:53 +05:00
parent a5978835d0
commit 76d18365a5
38 changed files with 991 additions and 816 deletions

View File

@@ -2,6 +2,18 @@
use Laravel\Pulse\Http\Middleware\Authorize;
use Laravel\Pulse\Recorders;
use Laravel\Pulse\Recorders\CacheInteractions;
use Laravel\Pulse\Recorders\Exceptions;
use Laravel\Pulse\Recorders\Queues;
use Laravel\Pulse\Recorders\Servers;
use Laravel\Pulse\Recorders\SlowJobs;
use Laravel\Pulse\Recorders\SlowOutgoingRequests;
use Laravel\Pulse\Recorders\SlowQueries;
use Laravel\Pulse\Recorders\SlowRequests;
use Laravel\Pulse\Recorders\UserJobs;
use Laravel\Pulse\Recorders\UserRequests;
use Maantje\Pulse\PhpFpm\Recorders\PhpFpmRecorder;
use Morrislaptop\LaravelPulse4xx\FourXxRecorder;
return [
@@ -127,7 +139,7 @@ return [
*/
'recorders' => [
Recorders\CacheInteractions::class => [
CacheInteractions::class => [
'enabled' => env('PULSE_CACHE_INTERACTIONS_ENABLED', true),
'sample_rate' => env('PULSE_CACHE_INTERACTIONS_SAMPLE_RATE', 1),
'ignore' => [
@@ -144,7 +156,7 @@ return [
],
],
Recorders\Exceptions::class => [
Exceptions::class => [
'enabled' => env('PULSE_EXCEPTIONS_ENABLED', true),
'sample_rate' => env('PULSE_EXCEPTIONS_SAMPLE_RATE', 1),
'location' => env('PULSE_EXCEPTIONS_LOCATION', true),
@@ -153,7 +165,7 @@ return [
],
],
Recorders\Queues::class => [
Queues::class => [
'enabled' => env('PULSE_QUEUES_ENABLED', true),
'sample_rate' => env('PULSE_QUEUES_SAMPLE_RATE', 1),
'ignore' => [
@@ -161,12 +173,12 @@ return [
],
],
Recorders\Servers::class => [
Servers::class => [
'server_name' => env('PULSE_SERVER_NAME', gethostname()),
'directories' => explode(':', env('PULSE_SERVER_DIRECTORIES', '/')),
],
Recorders\SlowJobs::class => [
SlowJobs::class => [
'enabled' => env('PULSE_SLOW_JOBS_ENABLED', true),
'sample_rate' => env('PULSE_SLOW_JOBS_SAMPLE_RATE', 1),
'threshold' => env('PULSE_SLOW_JOBS_THRESHOLD', 1000),
@@ -175,7 +187,7 @@ return [
],
],
Recorders\SlowOutgoingRequests::class => [
SlowOutgoingRequests::class => [
'enabled' => env('PULSE_SLOW_OUTGOING_REQUESTS_ENABLED', true),
'sample_rate' => env('PULSE_SLOW_OUTGOING_REQUESTS_SAMPLE_RATE', 1),
'threshold' => env('PULSE_SLOW_OUTGOING_REQUESTS_THRESHOLD', 1000),
@@ -189,7 +201,7 @@ return [
],
],
Recorders\SlowQueries::class => [
SlowQueries::class => [
'enabled' => env('PULSE_SLOW_QUERIES_ENABLED', true),
'sample_rate' => env('PULSE_SLOW_QUERIES_SAMPLE_RATE', 1),
'threshold' => env('PULSE_SLOW_QUERIES_THRESHOLD', 1000),
@@ -199,7 +211,7 @@ return [
],
],
Recorders\SlowRequests::class => [
SlowRequests::class => [
'enabled' => env('PULSE_SLOW_REQUESTS_ENABLED', true),
'sample_rate' => env('PULSE_SLOW_REQUESTS_SAMPLE_RATE', 1),
'threshold' => env('PULSE_SLOW_REQUESTS_THRESHOLD', 1000),
@@ -208,7 +220,7 @@ return [
],
],
Recorders\UserJobs::class => [
UserJobs::class => [
'enabled' => env('PULSE_USER_JOBS_ENABLED', true),
'sample_rate' => env('PULSE_USER_JOBS_SAMPLE_RATE', 1),
'ignore' => [
@@ -216,7 +228,7 @@ return [
],
],
Recorders\UserRequests::class => [
UserRequests::class => [
'enabled' => env('PULSE_USER_REQUESTS_ENABLED', true),
'sample_rate' => env('PULSE_USER_REQUESTS_SAMPLE_RATE', 1),
'ignore' => [
@@ -224,40 +236,25 @@ return [
],
],
\Morrislaptop\LaravelPulse4xx\FourXxRecorder::class => [
FourXxRecorder::class => [
'enabled' => env('PULSE_4XX_ENABLED', true),
'sample_rate' => env('PULSE_4XX_SAMPLE_RATE', 1),
'ignore' => [],
],
\Maantje\Pulse\Database\Recorders\DatabaseRecorder::class => [
'connections' => [
'pgsql' => [
'values' => [
'Connections',
'Threads_connected',
'Threads_running',
'Innodb_buffer_pool_reads',
'Innodb_buffer_pool_read_requests',
'Innodb_buffer_pool_pages_total',
'Max_used_connections',
],
'aggregates' => [
'avg' => [
'Threads_connected',
'Threads_running',
'Innodb_buffer_pool_reads',
'Innodb_buffer_pool_read_requests',
'Innodb_buffer_pool_pages_total',
],
'max' => [
//
],
'count' => [
//
],
],
],
PhpFpmRecorder::class => [
// Optionally set a server name gethostname() is the default
'server_name' => env('PULSE_SERVER_NAME', gethostname()),
// Optionally set a status path the current value is the default
'status_path' => 'localhost:9000/status', // with unix socket unix:/var/run/php-fpm/web.sock/status
// Optionally give datasets, these are the default values.
// Omitting a dataset or setting the value to false will remove the line from the chart
// You can also set a color as value that will be used in the chart
'datasets' => [
'active processes' => '#9333ea',
'total processes' => 'rgba(147,51,234,0.5)',
'idle processes' => '#eab308',
'listen queue' => '#e11d48',
],
],
],