src/Watchers/EventWatcher.php
public function recordEvent($eventName, $payload)
    {
        if (! Telescope::isRecording() || $this->shouldIgnore($eventName)) {
            return;
        }

        $formattedPayload = $this->extractPayload($eventName, $payload);

        Telescope::recordEvent(IncomingEntry::make([
            'name' => $eventName,
            'payload' => empty($formattedPayload) ? null : $formattedPayload,
            'listeners' => $this->formatListeners($eventName),
            'broadcast' => class_exists($eventName)
                        ? in_array(ShouldBroadcast::class, (array) class_implements($eventName))
                        : false,
        ])->tags(class_exists($eventName) && isset($payload[0]) ? ExtractTags::from($payload[0]) : []));
    }
public function recordEvent($eventName, $payload)
    {
        if (! Telescope::isRecording() || $this->shouldIgnore($eventName)) {
            return;
        }

        $formattedPayload = $this->extractPayload($eventName, $payload);

        Telescope::recordEvent(IncomingEntry::make([
            'name' => $eventName,
            'payload' => empty($formattedPayload) ? null : $formattedPayload,
            'listeners' => $this->formatListeners($eventName),
            'broadcast' => class_exists($eventName)
                        ? in_array(ShouldBroadcast::class, (array) class_implements($eventName))
                        : false,
        ])->tags(class_exists($eventName) && isset($payload[0]) ? ExtractTags::from($payload[0]) : []));
    }
public function recordEvent ( $ eventName , $ payload ) { if ( ! Telescope :: isRecording ( ) || $ this -> shouldIgnore ( $ eventName ) ) { return ; } $ formattedPayload = $ this -> extractPayload ( $ eventName , $ payload ) ; Telescope :: recordEvent ( IncomingEntry :: make ( [ 'name' => $ eventName , 'payload' => empty ( $ formattedPayload ) ? null : $ formattedPayload , 'listeners' => $ this -> formatListeners ( $ eventName ) , 'broadcast' => class_exists ( $ eventName ) ? in_array ( ShouldBroadcast :: class , ( array ) class_implements ( $ eventName ) ) : false , ] ) -> tags ( class_exists ( $ eventName ) && isset ( $ payload [ 0 ] ) ? ExtractTags :: from ( $ payload [ 0 ] ) : [ ] ) ) ; }
Record an event was fired.

@param  string  $eventName
@param  array  $payload
@return void
Record an event was fired .