Telescope
class Telescope
Traits
Constants
| protected DEFAULT_HIDDEN_REQUEST_HEADERS |
|
| protected DEFAULT_HIDDEN_REQUEST_PARAMETERS |
|
| PURGED_VALUE |
|
| REDACTED_VALUE |
|
| SHOULD_RECORD_CONTEXT_KEY |
|
| BATCH_ID_CONTEXT_KEY |
|
| protected RECORDING_STATE_CONTEXT_KEY |
|
| protected CSP_NONCE_CONTEXT_KEY |
|
Properties
| static Closure|null | $authUsing | The callback that should be used to authenticate Telescope users. |
from AuthorizesRequests |
| static protected Closure|null | $shouldListenCallback | The callback that determines if Telescope should start recording. |
from ListensForStorageOpportunities |
| static protected array | $watchers | The class names of the registered watchers. |
from RegistersWatchers |
| static array | $filterUsing | The callbacks that filter the entries that should be recorded. |
|
| static array | $filterBatchUsing | The callbacks that filter the batches that should be recorded. |
|
| static Closure|null | $afterRecordingHook | The callback executed after queuing a new entry. |
|
| static Closure[] | $afterStoringHooks | The callbacks executed after storing the entries. |
|
| static Closure[] | $tagUsing | The callbacks that add tags to the record. |
|
| $hiddenRequestHeaders | The list of hidden request headers. |
||
| $hiddenRequestParameters | The list of hidden request parameters. |
||
| $hiddenResponseParameters | The list of hidden response parameters. |
||
| static bool | $ignoreFrameworkEvents | Indicates if Telescope should ignore events fired by Hypervel. |
|
| static bool | $useDarkTheme | Indicates if Telescope should use the dark theme. |
|
| static bool | $started | Indicates if Telescope has started. |
|
| static protected array | $ignoredUris | The URIs that should be ignored. |
|
| static protected EntriesRepository|null | $store |
Methods
Register a callback to extract mailable tags.
Register listeners that store the recorded Telescope entries.
Set the callback that determines if Telescope should start recording.
Determine if Telescope should start recording.
Record the entries in queue before the request termination.
Start recording for approved console commands and scheduled tasks.
Get the current processing jobs.
Add a processing job to the stack.
Pop the last processing job from the stack.
Store the recorded entries if totally done processing the current job.
Determine if a given watcher has been registered.
Determine if the given command is approved for recording.
Get the URIs that should be ignored.
Start recording entries.
Stop recording entries.
Execute the given callback without recording Telescope entries.
Determine if Telescope is recording.
Get the entries queue.
Get the updates queue.
Get the current recording state.
Get or create the current recording state.
Flush all entries in the queue.
Flush all updates in the queue.
Set the callback that will be executed after an entry is recorded in the queue.
Collect the entries for storage.
Collect the updated entries for storage.
No description
Hide the given request header.
Hide the given request parameters.
Hide the given response parameters.
Specifies that Telescope should record events fired by Hypervel.
Get the CSS for the Telescope dashboard.
Get the JS for the Telescope dashboard.
Get the default JavaScript variables for Telescope.
Get the current CSP nonce attribute.
Flush all static state.
Details
in
AuthorizesRequests at line 24
static AuthorizesRequests
auth(Closure|null $callback)
Register the Telescope authentication callback.
Boot-only. The callback persists in a static property for the worker lifetime and runs on every Telescope dashboard request across all coroutines.
in
AuthorizesRequests at line 34
static bool
check(Request $request)
Determine if the given request can access the Telescope dashboard.
in
ExtractsMailableTags at line 15
static protected void
registerMailableTagExtractor()
Register a callback to extract mailable tags.
in
ListensForStorageOpportunities at line 39
static void
listenForStorageOpportunities(Container $app)
Register listeners that store the recorded Telescope entries.
Boot-only. Registers worker-lifetime event listeners; runtime use would accumulate duplicate listeners for every subsequent request/job.
in
ListensForStorageOpportunities at line 52
static void
shouldListenUsing(Closure|null $callback)
Set the callback that determines if Telescope should start recording.
Boot-only. The callback persists in a static property for the worker lifetime and is checked before every Telescope recording opportunity.
in
ListensForStorageOpportunities at line 60
static bool
shouldListen()
Determine if Telescope should start recording.
in
ListensForStorageOpportunities at line 75
static void
recordEntriesForRequests(Container $app)
Record the entries in queue before the request termination.
Boot-only. Registers a worker-lifetime request listener; runtime use would accumulate duplicate listeners.
in
ListensForStorageOpportunities at line 93
static void
manageRecordingStateForCommands(Container $app)
Start recording for approved console commands and scheduled tasks.
Boot-only. Registers worker-lifetime command and scheduled-task listeners; runtime use would accumulate duplicate listeners.
in
ListensForStorageOpportunities at line 153
static protected array
getProcessingJobs()
Get the current processing jobs.
in
ListensForStorageOpportunities at line 161
static protected array
addProcessingJob()
Add a processing job to the stack.
in
ListensForStorageOpportunities at line 174
static protected array
popProcessingJob()
Pop the last processing job from the stack.
in
ListensForStorageOpportunities at line 187
static protected void
storeEntriesAfterWorkerLoop(Container $app)
Store entries after the queue worker loops.
in
ListensForStorageOpportunities at line 222
static protected void
storeIfDoneProcessingJob(JobFailed|JobProcessed $event, Container $app)
Store the recorded entries if totally done processing the current job.
in
RegistersWatchers at line 19
static bool
hasWatcher(string $class)
Determine if a given watcher has been registered.
in
RegistersWatchers at line 31
static void
flushWatchers()
Flush the registered watchers.
Boot or tests only. Clears the worker-wide watcher registry; runtime use can cause later watcher checks to diverge from already-registered listeners.
in
RegistersWatchers at line 39
static protected void
registerWatchers(Application $app)
Register the configured Telescope watchers.
at line 127
static void
start(Application $app)
Register the Telescope watchers and start recording if necessary.
at line 144
static protected bool
commandIsApproved(string|null $command)
Determine if the given command is approved for recording.
at line 171
static protected bool
requestIsToApprovedUri(Request $request)
Determine if the request is to an approved URI.
at line 183
static protected array
getIgnoredUris()
Get the URIs that should be ignored.
at line 202
static void
startRecording()
Start recording entries.
at line 225
static void
stopRecording()
Stop recording entries.
at line 233
static mixed
withoutRecording(callable $callback)
Execute the given callback without recording Telescope entries.
at line 249
static bool
isRecording()
Determine if Telescope is recording.
at line 261
static protected void
record(string $type, IncomingEntry $entry)
Record the given entry.
at line 314
static array
getEntriesQueue()
Get the entries queue.
at line 324
static array
getUpdatesQueue()
Get the updates queue.
at line 334
static protected RecordingState|null
getRecordingState()
Get the current recording state.
at line 345
static protected RecordingState
getOrCreateRecordingState()
Get or create the current recording state.
at line 360
static void
recordUpdate(EntryUpdate $update)
Record the given entry update.
at line 372
static void
recordBatch(IncomingEntry $entry)
Record the given entry.
at line 380
static void
recordCache(IncomingEntry $entry)
Record the given entry.
at line 388
static void
recordCommand(IncomingEntry $entry)
Record the given entry.
at line 396
static void
recordDump(IncomingEntry $entry)
Record the given entry.
at line 404
static void
recordEvent(IncomingEntry $entry)
Record the given entry.
at line 412
static void
recordException(IncomingEntry $entry)
Record the given entry.
at line 420
static void
recordGate(IncomingEntry $entry)
Record the given entry.
at line 428
static void
recordJob(IncomingEntry $entry)
Record the given entry.
at line 436
static void
recordLog(IncomingEntry $entry)
Record the given entry.
at line 444
static void
recordMail(IncomingEntry $entry)
Record the given entry.
at line 452
static void
recordNotification(IncomingEntry $entry)
Record the given entry.
at line 460
static void
recordQuery(IncomingEntry $entry)
Record the given entry.
at line 468
static void
recordModelEvent(IncomingEntry $entry)
Record the given entry.
at line 476
static void
recordRedis(IncomingEntry $entry)
Record the given entry.
at line 484
static void
recordRequest(IncomingEntry $entry)
Record the given entry.
at line 492
static void
recordScheduledCommand(IncomingEntry $entry)
Record the given entry.
at line 500
static void
recordView(IncomingEntry $entry)
Record the given entry.
at line 508
static void
recordClientRequest(IncomingEntry $entry)
Record the given entry.
at line 516
static void
recordReverb(IncomingEntry $entry)
Record the given entry.
at line 524
static Telescope
flushEntries()
Flush all entries in the queue.
at line 536
static Telescope
flushUpdates()
Flush all updates in the queue.
at line 548
static void
catch(Throwable $e, array $tags = [])
Record the given exception.
at line 567
static Telescope
filter(Closure $callback)
Set the callback that filters the entries that should be recorded.
Boot-only. The callback persists in a static property for the worker lifetime and runs on every Telescope entry across all coroutines.
at line 580
static Telescope
filterBatch(Closure $callback)
Set the callback that filters the batches that should be recorded.
Boot-only. The callback persists in a static property for the worker lifetime and runs on every Telescope batch across all coroutines.
at line 593
static Telescope
afterRecording(Closure $callback)
Set the callback that will be executed after an entry is recorded in the queue.
Boot-only. The callback persists in a static property for the worker lifetime and runs on every entry recording across all coroutines.
at line 606
static Telescope
afterStoring(Closure $callback)
Add a callback that will be executed after an entry is stored.
Boot-only. The callback persists in a static property for the worker lifetime and runs after every batch store across all coroutines.
at line 619
static Telescope
tag(Closure $callback)
Add a callback that adds tags to the record.
Boot-only. The callback persists in a static property for the worker lifetime and runs on every tag computation across all coroutines.
at line 629
static void
store(EntriesRepository $storage)
Store the queued entries and flush the queue.
at line 646
static protected void
executeStore(EntriesRepository $storage)
Store the queued entries and flush the queue.
at line 694
static protected Collection
collectEntries(string $batchId)
Collect the entries for storage.
at line 709
static protected Collection
collectUpdates(string $batchId)
Collect the updated entries for storage.
at line 717
static protected string
getBatchId()
No description
at line 728
static Telescope
hideRequestHeaders(array $headers)
Hide the given request header.
Boot-only. The list persists in a static property for the worker lifetime and applies to every recorded request across all coroutines.
at line 744
static Telescope
hideRequestParameters(array $attributes)
Hide the given request parameters.
Boot-only. The list persists in a static property for the worker lifetime and applies to every recorded request across all coroutines.
at line 760
static Telescope
hideResponseParameters(array $attributes)
Hide the given response parameters.
Boot-only. The list persists in a static property for the worker lifetime and applies to every recorded response across all coroutines.
at line 776
static Telescope
recordFrameworkEvents()
Specifies that Telescope should record events fired by Hypervel.
Boot-only. The flag persists in a static property for the worker lifetime and applies to every framework-event filter across all coroutines.
at line 789
static Telescope
night()
Specifies that Telescope should use the dark theme.
Boot-only. The flag persists in a static property for the worker lifetime and applies to every dashboard render.
at line 802
static Telescope
avatar(Closure $callback)
Register the Telescope user avatar callback.
Boot-only. The callback persists on the Avatar registry for the worker lifetime and runs on every avatar lookup across all coroutines.
at line 812
static HtmlString
css()
Get the CSS for the Telescope dashboard.
at line 838
static HtmlString
js()
Get the JS for the Telescope dashboard.
at line 858
static array
scriptVariables()
Get the default JavaScript variables for Telescope.
at line 870
static Telescope
cspNonce(string $nonce)
Set the CSP nonce to use for style and script tags.
at line 880
static protected string
cspNonceAttribute()
Get the current CSP nonce attribute.
at line 891
static void
flushState()
Flush all static state.