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.

static array $hiddenRequestHeaders

The list of hidden request headers.

static array $hiddenRequestParameters

The list of hidden request parameters.

static array $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

auth(Closure|null $callback)

Register the Telescope authentication callback.

static bool
check(Request $request)

Determine if the given request can access the Telescope dashboard.

static void
registerMailableTagExtractor()

Register a callback to extract mailable tags.

static void
listenForStorageOpportunities(Container $app)

Register listeners that store the recorded Telescope entries.

static void
shouldListenUsing(Closure|null $callback)

Set the callback that determines if Telescope should start recording.

static bool
shouldListen()

Determine if Telescope should start recording.

static void
recordEntriesForRequests(Container $app)

Record the entries in queue before the request termination.

static void
manageRecordingStateForCommands(Container $app)

Start recording for approved console commands and scheduled tasks.

static array
getProcessingJobs()

Get the current processing jobs.

static array
addProcessingJob()

Add a processing job to the stack.

static array
popProcessingJob()

Pop the last processing job from the stack.

static void
storeEntriesAfterWorkerLoop(Container $app)

Store entries after the queue worker loops.

static void
storeIfDoneProcessingJob(JobFailed|JobProcessed $event, Container $app)

Store the recorded entries if totally done processing the current job.

static bool
hasWatcher(string $class)

Determine if a given watcher has been registered.

static void
flushWatchers()

Flush the registered watchers.

static void
registerWatchers(Application $app)

Register the configured Telescope watchers.

static void
start(Application $app)

Register the Telescope watchers and start recording if necessary.

static bool
commandIsApproved(string|null $command)

Determine if the given command is approved for recording.

static bool
requestIsToApprovedUri(Request $request)

Determine if the request is to an approved URI.

static array
getIgnoredUris()

Get the URIs that should be ignored.

static void
startRecording()

Start recording entries.

static void
stopRecording()

Stop recording entries.

static mixed
withoutRecording(callable $callback)

Execute the given callback without recording Telescope entries.

static bool
isRecording()

Determine if Telescope is recording.

static void
record(string $type, IncomingEntry $entry)

Record the given entry.

static array
getEntriesQueue()

Get the entries queue.

static array
getUpdatesQueue()

Get the updates queue.

static RecordingState|null
getRecordingState()

Get the current recording state.

static RecordingState
getOrCreateRecordingState()

Get or create the current recording state.

static void
recordUpdate(EntryUpdate $update)

Record the given entry update.

static void
recordBatch(IncomingEntry $entry)

Record the given entry.

static void
recordCache(IncomingEntry $entry)

Record the given entry.

static void
recordCommand(IncomingEntry $entry)

Record the given entry.

static void
recordDump(IncomingEntry $entry)

Record the given entry.

static void
recordEvent(IncomingEntry $entry)

Record the given entry.

static void
recordException(IncomingEntry $entry)

Record the given entry.

static void
recordGate(IncomingEntry $entry)

Record the given entry.

static void
recordJob(IncomingEntry $entry)

Record the given entry.

static void
recordLog(IncomingEntry $entry)

Record the given entry.

static void
recordMail(IncomingEntry $entry)

Record the given entry.

static void
recordNotification(IncomingEntry $entry)

Record the given entry.

static void
recordQuery(IncomingEntry $entry)

Record the given entry.

static void
recordModelEvent(IncomingEntry $entry)

Record the given entry.

static void
recordRedis(IncomingEntry $entry)

Record the given entry.

static void
recordRequest(IncomingEntry $entry)

Record the given entry.

static void
recordScheduledCommand(IncomingEntry $entry)

Record the given entry.

static void
recordView(IncomingEntry $entry)

Record the given entry.

static void
recordClientRequest(IncomingEntry $entry)

Record the given entry.

static void
recordReverb(IncomingEntry $entry)

Record the given entry.

static Telescope
flushEntries()

Flush all entries in the queue.

static Telescope
flushUpdates()

Flush all updates in the queue.

static void
catch(Throwable $e, array $tags = [])

Record the given exception.

static Telescope
filter(Closure $callback)

Set the callback that filters the entries that should be recorded.

static Telescope
filterBatch(Closure $callback)

Set the callback that filters the batches that should be recorded.

static Telescope
afterRecording(Closure $callback)

Set the callback that will be executed after an entry is recorded in the queue.

static Telescope
afterStoring(Closure $callback)

Add a callback that will be executed after an entry is stored.

static Telescope
tag(Closure $callback)

Add a callback that adds tags to the record.

static void
store(EntriesRepository $storage)

Store the queued entries and flush the queue.

static void
executeStore(EntriesRepository $storage)

Store the queued entries and flush the queue.

static Collection
collectEntries(string $batchId)

Collect the entries for storage.

static Collection
collectUpdates(string $batchId)

Collect the updated entries for storage.

static string
getBatchId()

No description

static Telescope
hideRequestHeaders(array $headers)

Hide the given request header.

static Telescope
hideRequestParameters(array $attributes)

Hide the given request parameters.

static Telescope
hideResponseParameters(array $attributes)

Hide the given response parameters.

static Telescope
recordFrameworkEvents()

Specifies that Telescope should record events fired by Hypervel.

static Telescope
night()

Specifies that Telescope should use the dark theme.

static Telescope
avatar(Closure $callback)

Register the Telescope user avatar callback.

static HtmlString
css()

Get the CSS for the Telescope dashboard.

static HtmlString
js()

Get the JS for the Telescope dashboard.

static array
scriptVariables()

Get the default JavaScript variables for Telescope.

static Telescope
cspNonce(string $nonce)

Set the CSP nonce to use for style and script tags.

static string
cspNonceAttribute()

Get the current CSP nonce attribute.

static void
flushState()

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.

Parameters

Closure|null $callback

Return Value

AuthorizesRequests

in AuthorizesRequests at line 34
static bool check(Request $request)

Determine if the given request can access the Telescope dashboard.

Parameters

Request $request

Return Value

bool

static protected void registerMailableTagExtractor()

Register a callback to extract mailable tags.

Return Value

void

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.

Parameters

Container $app

Return Value

void

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.

Parameters

Closure|null $callback

Return Value

void

static bool shouldListen()

Determine if Telescope should start recording.

Return Value

bool

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.

Parameters

Container $app

Return Value

void

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.

Parameters

Container $app

Return Value

void

static protected array getProcessingJobs()

Get the current processing jobs.

Return Value

array

static protected array addProcessingJob()

Add a processing job to the stack.

Return Value

array

static protected array popProcessingJob()

Pop the last processing job from the stack.

Return Value

array

static protected void storeEntriesAfterWorkerLoop(Container $app)

Store entries after the queue worker loops.

Parameters

Container $app

Return Value

void

static protected void storeIfDoneProcessingJob(JobFailed|JobProcessed $event, Container $app)

Store the recorded entries if totally done processing the current job.

Parameters

JobFailed|JobProcessed $event
Container $app

Return Value

void

in RegistersWatchers at line 19
static bool hasWatcher(string $class)

Determine if a given watcher has been registered.

Parameters

string $class

Return Value

bool

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.

Return Value

void

in RegistersWatchers at line 39
static protected void registerWatchers(Application $app)

Register the configured Telescope watchers.

Parameters

Application $app

Return Value

void

at line 127
static void start(Application $app)

Register the Telescope watchers and start recording if necessary.

Parameters

Application $app

Return Value

void

at line 144
static protected bool commandIsApproved(string|null $command)

Determine if the given command is approved for recording.

Parameters

string|null $command

Return Value

bool

at line 171
static protected bool requestIsToApprovedUri(Request $request)

Determine if the request is to an approved URI.

Parameters

Request $request

Return Value

bool

at line 183
static protected array getIgnoredUris()

Get the URIs that should be ignored.

Return Value

array

at line 202
static void startRecording()

Start recording entries.

Return Value

void

at line 225
static void stopRecording()

Stop recording entries.

Return Value

void

at line 233
static mixed withoutRecording(callable $callback)

Execute the given callback without recording Telescope entries.

Parameters

callable $callback

Return Value

mixed

at line 249
static bool isRecording()

Determine if Telescope is recording.

Return Value

bool

at line 261
static protected void record(string $type, IncomingEntry $entry)

Record the given entry.

Parameters

string $type
IncomingEntry $entry

Return Value

void

at line 314
static array getEntriesQueue()

Get the entries queue.

Return Value

array

at line 324
static array getUpdatesQueue()

Get the updates queue.

Return Value

array

at line 334
static protected RecordingState|null getRecordingState()

Get the current recording state.

Return Value

RecordingState|null

at line 345
static protected RecordingState getOrCreateRecordingState()

Get or create the current recording state.

Return Value

RecordingState

at line 360
static void recordUpdate(EntryUpdate $update)

Record the given entry update.

Parameters

EntryUpdate $update

Return Value

void

at line 372
static void recordBatch(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 380
static void recordCache(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 388
static void recordCommand(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 396
static void recordDump(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 404
static void recordEvent(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 412
static void recordException(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 420
static void recordGate(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 428
static void recordJob(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 436
static void recordLog(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 444
static void recordMail(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 452
static void recordNotification(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 460
static void recordQuery(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 468
static void recordModelEvent(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 476
static void recordRedis(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 484
static void recordRequest(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 492
static void recordScheduledCommand(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 500
static void recordView(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 508
static void recordClientRequest(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 516
static void recordReverb(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 524
static Telescope flushEntries()

Flush all entries in the queue.

Return Value

Telescope

at line 536
static Telescope flushUpdates()

Flush all updates in the queue.

Return Value

Telescope

at line 548
static void catch(Throwable $e, array $tags = [])

Record the given exception.

Parameters

Throwable $e
array $tags

Return Value

void

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.

Parameters

Closure $callback

Return Value

Telescope

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.

Parameters

Closure $callback

Return Value

Telescope

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.

Parameters

Closure $callback

Return Value

Telescope

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.

Parameters

Closure $callback

Return Value

Telescope

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.

Parameters

Closure $callback

Return Value

Telescope

at line 629
static void store(EntriesRepository $storage)

Store the queued entries and flush the queue.

Parameters

EntriesRepository $storage

Return Value

void

at line 646
static protected void executeStore(EntriesRepository $storage)

Store the queued entries and flush the queue.

Parameters

EntriesRepository $storage

Return Value

void

at line 694
static protected Collection collectEntries(string $batchId)

Collect the entries for storage.

Parameters

string $batchId

Return Value

Collection

at line 709
static protected Collection collectUpdates(string $batchId)

Collect the updated entries for storage.

Parameters

string $batchId

Return Value

Collection

at line 717
static protected string getBatchId()

No description

Return Value

string

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.

Parameters

array $headers

Return Value

Telescope

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.

Parameters

array $attributes

Return Value

Telescope

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.

Parameters

array $attributes

Return Value

Telescope

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.

Return Value

Telescope

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.

Return Value

Telescope

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.

Parameters

Closure $callback

Return Value

Telescope

at line 812
static HtmlString css()

Get the CSS for the Telescope dashboard.

Return Value

HtmlString

at line 838
static HtmlString js()

Get the JS for the Telescope dashboard.

Return Value

HtmlString

at line 858
static array scriptVariables()

Get the default JavaScript variables for Telescope.

Return Value

array

at line 870
static Telescope cspNonce(string $nonce)

Set the CSP nonce to use for style and script tags.

Parameters

string $nonce

Return Value

Telescope

at line 880
static protected string cspNonceAttribute()

Get the current CSP nonce attribute.

Return Value

string

at line 891
static void flushState()

Flush all static state.

Return Value

void