Telescope
class Telescope
Traits
Constants
| protected DEFAULT_HIDDEN_REQUEST_HEADERS |
|
| protected DEFAULT_HIDDEN_REQUEST_PARAMETERS |
|
| protected DEFAULT_HIDDEN_RESPONSE_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.
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 35
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 40
static void
listenForStorageOpportunities(Container $app)
Register listeners that store the recorded Telescope entries.
Registers worker-lifetime event listeners; runtime use would accumulate duplicate listeners for every subsequent request/job.
in
ListensForStorageOpportunities at line 54
static void
shouldListenUsing(Closure|null $callback)
Set the callback that determines if Telescope should start recording.
The callback persists in a static property for the worker lifetime and is checked before every Telescope recording opportunity.
in
ListensForStorageOpportunities at line 63
static bool
shouldListen()
Determine if Telescope should start recording.
in
ListensForStorageOpportunities at line 78
static void
recordEntriesForRequests(Container $app)
Record the entries in queue before the request termination.
Registers a worker-lifetime request listener; runtime use would accumulate duplicate listeners.
in
ListensForStorageOpportunities at line 97
static void
manageRecordingStateForCommands(Container $app)
Start recording for approved console commands and scheduled tasks.
Registers worker-lifetime command and scheduled-task listeners; runtime use would accumulate duplicate listeners.
in
ListensForStorageOpportunities at line 158
static protected array
getProcessingJobs()
Get the current processing jobs.
in
ListensForStorageOpportunities at line 166
static protected array
addProcessingJob()
Add a processing job to the stack.
in
ListensForStorageOpportunities at line 179
static protected array
popProcessingJob()
Pop the last processing job from the stack.
in
ListensForStorageOpportunities at line 192
static protected void
storeEntriesAfterWorkerLoop(Container $app)
Store entries after the queue worker loops.
in
ListensForStorageOpportunities at line 227
static protected void
storeIfDoneProcessingJob(JobFailed|JobProcessed $event, Container $app)
Store the recorded entries if totally done processing the current job.
in
RegistersWatchers at line 20
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.
Clears the worker-wide watcher registry; runtime use can cause later watcher checks to diverge from already-registered listeners.
in
RegistersWatchers at line 40
static protected void
registerWatchers(Application $app)
Register the configured Telescope watchers.
at line 160
static void
start(Application $app)
Register the Telescope watchers and start recording if necessary.
Registers worker-lifetime watchers, listeners and the mailable tag extractor; runtime use registers them again for later requests.
at line 178
static protected bool
commandIsApproved(string|null $command)
Determine if the given command is approved for recording.
at line 207
static protected bool
requestIsToApprovedUri(Request $request)
Determine if the request is to an approved URI.
at line 219
static protected array
getIgnoredUris()
Get the URIs that should be ignored.
at line 238
static void
startRecording()
Start recording entries.
at line 264
static void
stopRecording()
Stop recording entries.
at line 272
static mixed
withoutRecording(callable $callback)
Execute the given callback without recording Telescope entries.
at line 288
static bool
isRecording()
Determine if Telescope is recording.
at line 300
static protected void
record(string $type, IncomingEntry $entry)
Record the given entry.
at line 357
static array
getEntriesQueue()
Get the entries queue.
at line 367
static array
getUpdatesQueue()
Get the updates queue.
at line 377
static protected RecordingState|null
getRecordingState()
Get the current recording state.
at line 388
static protected RecordingState
getOrCreateRecordingState()
Get or create the current recording state.
at line 403
static void
recordUpdate(EntryUpdate $update)
Record the given entry update.
at line 415
static void
recordBatch(IncomingEntry $entry)
Record the given entry.
at line 423
static void
recordCache(IncomingEntry $entry)
Record the given entry.
at line 431
static void
recordCommand(IncomingEntry $entry)
Record the given entry.
at line 439
static void
recordDump(IncomingEntry $entry)
Record the given entry.
at line 447
static void
recordEvent(IncomingEntry $entry)
Record the given entry.
at line 455
static void
recordException(IncomingEntry $entry)
Record the given entry.
at line 463
static void
recordGate(IncomingEntry $entry)
Record the given entry.
at line 471
static void
recordJob(IncomingEntry $entry)
Record the given entry.
at line 479
static void
recordLog(IncomingEntry $entry)
Record the given entry.
at line 487
static void
recordMail(IncomingEntry $entry)
Record the given entry.
at line 495
static void
recordNotification(IncomingEntry $entry)
Record the given entry.
at line 503
static void
recordQuery(IncomingEntry $entry)
Record the given entry.
at line 511
static void
recordModelEvent(IncomingEntry $entry)
Record the given entry.
at line 519
static void
recordRedis(IncomingEntry $entry)
Record the given entry.
at line 527
static void
recordRequest(IncomingEntry $entry)
Record the given entry.
at line 535
static void
recordScheduledCommand(IncomingEntry $entry)
Record the given entry.
at line 543
static void
recordView(IncomingEntry $entry)
Record the given entry.
at line 551
static void
recordClientRequest(IncomingEntry $entry)
Record the given entry.
at line 559
static void
recordReverb(IncomingEntry $entry)
Record the given entry.
at line 567
static Telescope
flushEntries()
Flush all entries in the queue.
at line 579
static Telescope
flushUpdates()
Flush all updates in the queue.
at line 591
static void
catch(Throwable $e, array $tags = [])
Record the given exception.
at line 610
static Telescope
filter(Closure $callback)
Set the callback that filters the entries that should be recorded.
The callback persists in a static property for the worker lifetime and runs on every Telescope entry across all coroutines.
at line 624
static Telescope
filterBatch(Closure $callback)
Set the callback that filters the batches that should be recorded.
The callback persists in a static property for the worker lifetime and runs on every Telescope batch across all coroutines.
at line 638
static Telescope
afterRecording(Closure $callback)
Set the callback that will be executed after an entry is recorded in the queue.
The callback persists in a static property for the worker lifetime and runs on every entry recording across all coroutines.
at line 652
static Telescope
afterStoring(Closure $callback)
Add a callback that will be executed after an entry is stored.
The callback persists in a static property for the worker lifetime and runs after every batch store across all coroutines.
at line 666
static Telescope
tag(Closure $callback)
Add a callback that adds tags to the record.
The callback persists in a static property for the worker lifetime and runs on every tag computation across all coroutines.
at line 677
static void
store(EntriesRepository $storage)
Store the queued entries and flush the queue.
at line 694
static protected void
executeStore(EntriesRepository $storage)
Store the queued entries and flush the queue.
at line 742
static protected Collection
collectEntries(string $batchId)
Collect the entries for storage.
at line 757
static protected Collection
collectUpdates(string $batchId)
Collect the updated entries for storage.
at line 765
static protected string
getBatchId()
No description
at line 776
static Telescope
hideRequestHeaders(array $headers)
Hide the given request header.
The list persists in a static property for the worker lifetime and applies to every recorded request across all coroutines.
at line 793
static Telescope
hideRequestParameters(array $attributes)
Hide the given request parameters.
The list persists in a static property for the worker lifetime and applies to every recorded request across all coroutines.
at line 810
static Telescope
hideResponseParameters(array $attributes)
Hide the given response parameters.
The list persists in a static property for the worker lifetime and applies to every recorded response across all coroutines.
at line 827
static Telescope
recordFrameworkEvents()
Specifies that Telescope should record events fired by Hypervel.
The flag persists in a static property for the worker lifetime and applies to every framework-event filter across all coroutines.
at line 841
static Telescope
night()
Specifies that Telescope should use the dark theme.
The flag persists in a static property for the worker lifetime and applies to every dashboard render.
at line 855
static Telescope
avatar(Closure $callback)
Register the Telescope user avatar callback.
The callback persists on the Avatar registry for the worker lifetime and runs on every avatar lookup across all coroutines.
at line 866
static HtmlString
css()
Get the CSS for the Telescope dashboard.
at line 892
static HtmlString
js()
Get the JS for the Telescope dashboard.
at line 912
static array
scriptVariables()
Get the default JavaScript variables for Telescope.
at line 924
static Telescope
cspNonce(string $nonce)
Set the CSP nonce to use for style and script tags.
at line 934
static protected string
cspNonceAttribute()
Get the current CSP nonce attribute.
at line 945
static void
flushState()
Flush all static state.