123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <?php
- use Laravel\Pulse\Http\Middleware\Authorize;
- use Laravel\Pulse\Pulse;
- use Laravel\Pulse\Recorders;
- return [
- /*
- |--------------------------------------------------------------------------
- | Pulse Domain
- |--------------------------------------------------------------------------
- |
- | This is the subdomain which the Pulse dashboard will be accessible from.
- | When set to null, the dashboard will reside under the same domain as
- | the application. Remember to configure your DNS entries correctly.
- |
- */
- 'domain' => env('PULSE_DOMAIN'),
- /*
- |--------------------------------------------------------------------------
- | Pulse Path
- |--------------------------------------------------------------------------
- |
- | This is the path which the Pulse dashboard will be accessible from. Feel
- | free to change this path to anything you'd like. Note that this won't
- | affect the path of the internal API that is never exposed to users.
- |
- */
- 'path' => env('PULSE_PATH', 'pulse'),
- /*
- |--------------------------------------------------------------------------
- | Pulse Master Switch
- |--------------------------------------------------------------------------
- |
- | This configuration option may be used to completely disable all Pulse
- | data recorders regardless of their individual configurations. This
- | provides a single option to quickly disable all Pulse recording.
- |
- */
- 'enabled' => env('PULSE_ENABLED', false),
- /*
- |--------------------------------------------------------------------------
- | Pulse Storage Driver
- |--------------------------------------------------------------------------
- |
- | This configuration option determines which storage driver will be used
- | while storing entries from Pulse's recorders. In addition, you also
- | may provide any options to configure the selected storage driver.
- |
- */
- 'storage' => [
- 'driver' => env('PULSE_STORAGE_DRIVER', 'database'),
- 'trim' => [
- 'keep' => env('PULSE_STORAGE_KEEP', '7 days'),
- ],
- 'database' => [
- 'connection' => env('PULSE_DB_CONNECTION'),
- 'chunk' => 1000,
- ],
- ],
- /*
- |--------------------------------------------------------------------------
- | Pulse Ingest Driver
- |--------------------------------------------------------------------------
- |
- | This configuration options determines the ingest driver that will be used
- | to capture entries from Pulse's recorders. Ingest drivers are great to
- | free up your request workers quickly by offloading the data storage.
- |
- */
- 'ingest' => [
- 'driver' => env('PULSE_INGEST_DRIVER', 'storage'),
- 'buffer' => env('PULSE_INGEST_BUFFER', 5_000),
- 'trim' => [
- 'lottery' => [1, 1_000],
- 'keep' => env('PULSE_INGEST_KEEP', '7 days'),
- ],
- 'redis' => [
- 'connection' => env('PULSE_REDIS_CONNECTION'),
- 'chunk' => 1000,
- ],
- ],
- /*
- |--------------------------------------------------------------------------
- | Pulse Cache Driver
- |--------------------------------------------------------------------------
- |
- | This configuration option determines the cache driver that will be used
- | for various tasks, including caching dashboard results, establishing
- | locks for events that should only occur on one server and signals.
- |
- */
- 'cache' => env('PULSE_CACHE_DRIVER'),
- /*
- |--------------------------------------------------------------------------
- | Pulse Route Middleware
- |--------------------------------------------------------------------------
- |
- | These middleware will be assigned to every Pulse route, giving you the
- | chance to add your own middleware to this list or change any of the
- | existing middleware. Of course, reasonable defaults are provided.
- |
- */
- 'middleware' => [
- 'web',
- Authorize::class,
- ],
- /*
- |--------------------------------------------------------------------------
- | Pulse Recorders
- |--------------------------------------------------------------------------
- |
- | The following array lists the "recorders" that will be registered with
- | Pulse, along with their configuration. Recorders gather application
- | event data from requests and tasks to pass to your ingest driver.
- |
- */
- 'recorders' => [
- Recorders\CacheInteractions::class => [
- 'enabled' => env('PULSE_CACHE_INTERACTIONS_ENABLED', true),
- 'sample_rate' => env('PULSE_CACHE_INTERACTIONS_SAMPLE_RATE', 1),
- 'ignore' => [
- ...Pulse::defaultVendorCacheKeys(),
- ],
- 'groups' => [
- '/^job-exceptions:.*/' => 'job-exceptions:*',
- // '/:\d+/' => ':*',
- ],
- ],
- Recorders\Exceptions::class => [
- 'enabled' => env('PULSE_EXCEPTIONS_ENABLED', true),
- 'sample_rate' => env('PULSE_EXCEPTIONS_SAMPLE_RATE', 1),
- 'location' => env('PULSE_EXCEPTIONS_LOCATION', true),
- 'ignore' => [
- // '/^Package\\\\Exceptions\\\\/',
- ],
- ],
- Recorders\Queues::class => [
- 'enabled' => env('PULSE_QUEUES_ENABLED', true),
- 'sample_rate' => env('PULSE_QUEUES_SAMPLE_RATE', 1),
- 'ignore' => [
- // '/^Package\\\\Jobs\\\\/',
- ],
- ],
- Recorders\Servers::class => [
- 'server_name' => env('PULSE_SERVER_NAME', gethostname()),
- 'directories' => explode(':', env('PULSE_SERVER_DIRECTORIES', '/')),
- ],
- Recorders\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),
- 'ignore' => [
- // '/^Package\\\\Jobs\\\\/',
- ],
- ],
- Recorders\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),
- 'ignore' => [
- // '#^http://127\.0\.0\.1:13714#', // Inertia SSR...
- ],
- 'groups' => [
- // '#^https://api\.github\.com/repos/.*$#' => 'api.github.com/repos/*',
- // '#^https?://([^/]*).*$#' => '\1',
- // '#/\d+#' => '/*',
- ],
- ],
- Recorders\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),
- 'location' => env('PULSE_SLOW_QUERIES_LOCATION', true),
- 'max_query_length' => env('PULSE_SLOW_QUERIES_MAX_QUERY_LENGTH'),
- 'ignore' => [
- '/(["`])pulse_[\w]+?\1/', // Pulse tables...
- '/(["`])telescope_[\w]+?\1/', // Telescope tables...
- ],
- ],
- Recorders\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),
- 'ignore' => [
- '#^/'.env('PULSE_PATH', 'pulse').'$#', // Pulse dashboard...
- '#^/telescope#', // Telescope dashboard...
- ],
- ],
- Recorders\UserJobs::class => [
- 'enabled' => env('PULSE_USER_JOBS_ENABLED', true),
- 'sample_rate' => env('PULSE_USER_JOBS_SAMPLE_RATE', 1),
- 'ignore' => [
- // '/^Package\\\\Jobs\\\\/',
- ],
- ],
- Recorders\UserRequests::class => [
- 'enabled' => env('PULSE_USER_REQUESTS_ENABLED', true),
- 'sample_rate' => env('PULSE_USER_REQUESTS_SAMPLE_RATE', 1),
- 'ignore' => [
- '#^/'.env('PULSE_PATH', 'pulse').'$#', // Pulse dashboard...
- '#^/telescope#', // Telescope dashboard...
- ],
- ],
- ],
- ];
|