Skip to content

Commit

Permalink
Update Telescope configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
zanechua committed Feb 1, 2019
1 parent be571c9 commit 93663e2
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 19 deletions.
9 changes: 5 additions & 4 deletions app/Providers/TelescopeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ public function register()
return true;
}

return $entry->isReportableException() ||
$entry->isFailedJob() ||
$entry->isScheduledTask() ||
$entry->hasMonitoredTag();
// return $entry->isReportableException() ||
// $entry->isFailedJob() ||
// $entry->isScheduledTask() ||
// $entry->hasMonitoredTag();
return true;
});
}

Expand Down
77 changes: 62 additions & 15 deletions config/telescope.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php

use Laravel\Telescope\Http\Middleware\Authorize;
use Laravel\Telescope\Watchers;
use Laravel\Telescope\Http\Middleware\Authorize;

return [

'enabled' => env('TELESCOPE_ENABLED', true),

'path' => 'telescope',

/*
Expand All @@ -28,6 +26,19 @@
],
],

/*
|--------------------------------------------------------------------------
| Telescope Master Switch
|--------------------------------------------------------------------------
|
| This option may be used to disable all Telescope watchers regardless
| of their individual configuration, which simply provides a single
| and convenient way to enable or disable Telescope data storage.
|
*/

'enabled' => env('TELESCOPE_ENABLED', true),

/*
|--------------------------------------------------------------------------
| Telescope Route Middleware
Expand All @@ -44,6 +55,25 @@
Authorize::class,
],

/*
|--------------------------------------------------------------------------
| Ignored Paths & Commands
|--------------------------------------------------------------------------
|
| The following array lists the URI paths and Artisan commands that will
| not be watched by Telescope. In addition to this list, some Laravel
| commands, like migrations and queue commands, are always ignored.
|
*/

'ignore_paths' => [
//
],

'ignore_commands' => [
//
],

/*
|--------------------------------------------------------------------------
| Telescope Watchers
Expand All @@ -56,27 +86,44 @@
*/

'watchers' => [
Watchers\CacheWatcher::class => env('TELESCOPE_CACHE_WATCHER', true),
Watchers\CommandWatcher::class => env('TELESCOPE_COMMAND_WATCHER', true),
Watchers\DumpWatcher::class => env('TELESCOPE_DUMP_WATCHER', true),
Watchers\EventWatcher::class => env('TELESCOPE_EVENT_WATCHER', true),
Watchers\ExceptionWatcher::class => env('TELESCOPE_EXCEPTION_WATCHER', true),
Watchers\JobWatcher::class => env('TELESCOPE_JOB_WATCHER', true),
Watchers\LogWatcher::class => env('TELESCOPE_LOG_WATCHER', true),
Watchers\MailWatcher::class => env('TELESCOPE_MAIL_WATCHER', true),
Watchers\ModelWatcher::class => env('TELESCOPE_MODEL_WATCHER', true),
Watchers\CacheWatcher::class => env('TELESCOPE_CACHE_WATCHER', true),

Watchers\CommandWatcher::class => [
'enabled' => env('TELESCOPE_COMMAND_WATCHER', true),
'ignore' => [],
],

Watchers\DumpWatcher::class => env('TELESCOPE_DUMP_WATCHER', true),
Watchers\EventWatcher::class => env('TELESCOPE_EVENT_WATCHER', true),
Watchers\ExceptionWatcher::class => env('TELESCOPE_EXCEPTION_WATCHER', true),
Watchers\JobWatcher::class => env('TELESCOPE_JOB_WATCHER', true),
Watchers\LogWatcher::class => env('TELESCOPE_LOG_WATCHER', true),
Watchers\MailWatcher::class => env('TELESCOPE_MAIL_WATCHER', true),

Watchers\ModelWatcher::class => [
'enabled' => env('TELESCOPE_MODEL_WATCHER', true),
'events' => ['eloquent.*'],
],

Watchers\NotificationWatcher::class => env('TELESCOPE_NOTIFICATION_WATCHER', true),

Watchers\QueryWatcher::class => [
'enabled' => env('TELESCOPE_QUERY_WATCHER', true),
'slow' => 100,
'ignore_packages' => true,
'slow' => 100,
],

Watchers\RedisWatcher::class => env('TELESCOPE_REDIS_WATCHER', true),

Watchers\RequestWatcher::class => [
'enabled' => env('TELESCOPE_REQUEST_WATCHER', true),
'size_limit' => env('TELESCOPE_REQUEST_SIZE_LIMIT', 64),
'enabled' => env('TELESCOPE_REQUEST_WATCHER', true),
'size_limit' => env('TELESCOPE_RESPONSE_SIZE_LIMIT', 64),
],

Watchers\GateWatcher::class => [
'enabled' => env('TELESCOPE_GATE_WATCHER', true),
'ignore_abilities' => [],
'ignore_packages' => true,
],

Watchers\ScheduleWatcher::class => env('TELESCOPE_SCHEDULE_WATCHER', true),
Expand Down

0 comments on commit 93663e2

Please sign in to comment.