Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

iamamirsalehi's avatar

telescope does not work on production

Hi there, I have the telescope in my local environment and it works perfectly but when I deploy it on the production it actually just shows me some icons. the code below is the register method of TelescopeServiceProvider

public function register()
    {
        // Telescope::night();

        $this->hideSensitiveRequestDetails();

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

            return $entry->isReportableException() ||
                $entry->isFailedRequest() ||
                $entry->isFailedJob() ||
                $entry->isScheduledTask() ||
                $entry->hasMonitoredTag() ||
                $entry->type === EntryType::LOG;
        });
    }
0 likes
5 replies
Tray2's avatar

Have you checked your composer.json file and checked that it's in the require section and not the require-dev section?

Tektōn's avatar

You can try change this:

php $this->app->environment('local')

to this:

php $this->app->environment('production')

Also, according to the docs, you should ensure you change your APP_ENV environment variable to production in your production environment. Otherwise, your Telescope installation will be publicly available.

1 like
Tektōn's avatar

@webrobert That's Ok. I got a similar issue just a couple of months ago. In case someone else gets this issue, at least we already have the answer in the forum 😊

Please or to participate in this conversation.