class Telescope

Traits

Constants

protected DEFAULT_HIDDEN_REQUEST_HEADERS

protected DEFAULT_HIDDEN_REQUEST_PARAMETERS

ENTRIES_QUEUE_CONTEXT_KEY

UPDATES_QUEUE_CONTEXT_KEY

SHOULD_RECORD_CONTEXT_KEY

IS_RECORDING_CONTEXT_KEY

HAS_STORED_CONTEXT_KEY

BATCH_ID_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 
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)

Manage starting and stopping the recording state for commands.

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
runningApprovedArtisanCommand()

Determine if the application is running an approved command.

static bool
handlingApprovedRequest(Application $app)

Determine if the application is handling an approved request.

static bool
requestIsToApprovedDomain(Request $request)

Determine if the request is to an approved domain.

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 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 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 registerMailableTagExtractor()

Register a callback to extract mailable tags.

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)

Manage starting and stopping the recording state for commands.

Boot-only. Registers a worker-lifetime command listener; 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 128
static void start(Application $app)

Register the Telescope watchers and start recording if necessary.

Parameters

Application $app

Return Value

void

at line 145
static protected bool runningApprovedArtisanCommand()

Determine if the application is running an approved command.

Return Value

bool

at line 171
static protected bool handlingApprovedRequest(Application $app)

Determine if the application is handling an approved request.

Parameters

Application $app

Return Value

bool

at line 184
static protected bool requestIsToApprovedDomain(Request $request)

Determine if the request is to an approved domain.

Parameters

Request $request

Return Value

bool

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

Determine if the request is to an approved URI.

Parameters

Request $request

Return Value

bool

at line 205
static protected array getIgnoredUris()

Get the URIs that should be ignored.

Return Value

array

at line 225
static void startRecording()

Start recording entries.

Return Value

void

at line 248
static void stopRecording()

Stop recording entries.

Return Value

void

at line 256
static mixed withoutRecording(callable $callback)

Execute the given callback without recording Telescope entries.

Parameters

callable $callback

Return Value

mixed

at line 272
static bool isRecording()

Determine if Telescope is recording.

Return Value

bool

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

Record the given entry.

Parameters

string $type
IncomingEntry $entry

Return Value

void

at line 333
static array getEntriesQueue()

Get the entries queue.

Return Value

array

at line 341
static array getUpdatesQueue()

Get the updates queue.

Return Value

array

at line 349
static void recordUpdate(EntryUpdate $update)

Record the given entry update.

Parameters

EntryUpdate $update

Return Value

void

at line 363
static void recordBatch(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 371
static void recordCache(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 379
static void recordCommand(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 387
static void recordDump(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 395
static void recordEvent(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 403
static void recordException(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 411
static void recordGate(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 419
static void recordJob(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 427
static void recordLog(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 435
static void recordMail(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 443
static void recordNotification(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 451
static void recordQuery(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 459
static void recordModelEvent(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 467
static void recordRedis(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 475
static void recordRequest(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 483
static void recordScheduledCommand(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 491
static void recordView(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 499
static void recordClientRequest(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 507
static void recordReverb(IncomingEntry $entry)

Record the given entry.

Parameters

IncomingEntry $entry

Return Value

void

at line 515
static Telescope flushEntries()

Flush all entries in the queue.

Return Value

Telescope

at line 525
static Telescope flushUpdates()

Flush all updates in the queue.

Return Value

Telescope

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

Record the given exception.

Parameters

Throwable $e
array $tags

Return Value

void

at line 549
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 562
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 575
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 588
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 601
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 611
static void store(EntriesRepository $storage)

Store the queued entries and flush the queue.

Parameters

EntriesRepository $storage

Return Value

void

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

Store the queued entries and flush the queue.

Parameters

EntriesRepository $storage

Return Value

void

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

Collect the entries for storage.

Parameters

string $batchId

Return Value

Collection

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

Collect the updated entries for storage.

Parameters

string $batchId

Return Value

Collection

at line 697
static protected string getBatchId()

No description

Return Value

string

at line 708
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 724
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 740
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 756
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 769
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 782
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 792
static HtmlString css()

Get the CSS for the Telescope dashboard.

Return Value

HtmlString

at line 816
static HtmlString js()

Get the JS for the Telescope dashboard.

Return Value

HtmlString

at line 835
static array scriptVariables()

Get the default JavaScript variables for Telescope.

Return Value

array

at line 847
static void flushState()

Flush all static state.

Return Value

void