src/Watchers/JobWatcher.php
public function recordFailedJob(JobFailed $event)
    {
        if (! Telescope::isRecording()) {
            return;
        }

        $uuid = $event->job->payload()['telescope_uuid'] ?? null;

        if (! $uuid) {
            return;
        }

        Telescope::recordUpdate(EntryUpdate::make(
            $uuid, EntryType::JOB, [
                'status' => 'failed',
                'exception' => [
                    'message' => $event->exception->getMessage(),
                    'trace' => $event->exception->getTrace(),
                    'line' => $event->exception->getLine(),
                    'line_preview' => ExceptionContext::get($event->exception),
                ],
            ]
        )->addTags(['failed']));
    }
public function recordFailedJob(JobFailed $event)
    {
        if (! Telescope::isRecording()) {
            return;
        }

        $uuid = $event->job->payload()['telescope_uuid'] ?? null;

        if (! $uuid) {
            return;
        }

        Telescope::recordUpdate(EntryUpdate::make(
            $uuid, EntryType::JOB, [
                'status' => 'failed',
                'exception' => [
                    'message' => $event->exception->getMessage(),
                    'trace' => $event->exception->getTrace(),
                    'line' => $event->exception->getLine(),
                    'line_preview' => ExceptionContext::get($event->exception),
                ],
            ]
        )->addTags(['failed']));
    }
public function recordFailedJob ( JobFailed $ event ) { if ( ! Telescope :: isRecording ( ) ) { return ; } $ uuid = $ event -> job -> payload ( ) [ 'telescope_uuid' ] ?? null ; if ( ! $ uuid ) { return ; } Telescope :: recordUpdate ( EntryUpdate :: make ( $ uuid , EntryType :: JOB , [ 'status' => 'failed' , 'exception' => [ 'message' => $ event -> exception -> getMessage ( ) , 'trace' => $ event -> exception -> getTrace ( ) , 'line' => $ event -> exception -> getLine ( ) , 'line_preview' => ExceptionContext :: get ( $ event -> exception ) , ] , ] ) -> addTags ( [ 'failed' ] ) ) ; }
Record a queue job has failed.

@param  \Illuminate\Queue\Events\JobFailed  $event
@return void
Record a queue job has failed .