1

We are using telescope to monitor our laravel application. but telescope is using big amount of database. Yes we can delete records . But is there any way that we only allow telescope to insert record related to queues and schedule commands not all data like requests , database queries and many other things.

1 Answers1

1

Yes you can do this in app\Providers\TelescopeServiceProvider.php

From the docs:

You may filter the data that is recorded by Telescope via the filter callback that is registered in your TelescopeServiceProvider. By default, this callback records all data in the local environment and exceptions, failed jobs, scheduled tasks, and data with monitored tags in all other environments:

public function register()
{
    $this->hideSensitiveRequestDetails();

    Telescope::filter(function (IncomingEntry $entry) {
        if ($this->app->environment('local')) {
            return true;
        }

        return $entry->isReportableException() ||
            $entry->isFailedJob() ||
            $entry->isScheduledTask() ||
            $entry->hasMonitoredTag();
    });
}

As you can see it will only report the following when APP_ENV is not set to local:

isReportableException()
isFailedJob()
isScheduledTask()
hasMonitoredTag()

So if you set your APP_ENV to production it should not record every request.

Remul
  • 7,874
  • 1
  • 13
  • 30