laravellaravel-telescope

Laravel Telescope flooded by requests


I have Laravel Telescope running, and it gets requests from somewhere every 3 seconds.

Screenshot

Requests are: /telescope/telescope-api/requests?before=&family_hash=&tag=&take=50 and /telescope/telescope-api/requests?family_hash=&tag=&take=1

Does anyone know from where I got those requests and how to stop them?


Solution

  • These recurring /telescope/telescope-api/requests?... Calls every ~3 seconds are made by Laravel Telescope’s front-end UI itself to poll for new request data. They get triggered automatically when you have the Telescope page open in your browser.

    How to Stop the Requests

    1. Temporary : Simply closing the Telescope UI in your browser will stop the polling as

    2. Permanently:

      public function register(): void
      {
          $this->hideSensitiveRequestDetails();
          $isLocal = $this->app->environment('local');
          $isTelescopeRequest = request()?->is('telescope/telescope-api/*');
          Telescope::filter(function (IncomingEntry $entry) use ($isLocal) {
              return $isLocal ||
                      !$isTelescopeRequest||
                      $entry->isReportableException() ||
                      $entry->isFailedRequest() ||
                      $entry->isFailedJob() ||
                      $entry->isScheduledTask() ||
                      $entry->hasMonitoredTag();
              });
      } 
      

    Make sure you have not made any changes in the default configurations of the telescope to capture it's request also. Please share you configurations also so that we will be able to provide more details for a simple solutions.