Michael Dryrynda has a post to his site sharing a method for using Laravel Telescope in specific environments. Telescope provides enhanced debugging functionality to Laravel applications for introspection into data about requests, jobs, queues and more.

Whilst its primary purpose is as a debugging tool in development, it is also a powerful asset in debugging your production environment. In order to get Telescope, however, I ran in to some stumbling points in my CI environment in GitLab.

To work around this, I set out to conditionally load Telescope. I stumbled upon this comment from Mohamed Said, which suggested loading the TelescopeServiceProvider in one of your application's service providers, but doing so was not enough.

He goes on to talk about the package auto-discover functionality Telescope uses to load its provider and how this, along with the dont-discover configuration option in Composer's extra section can be used to control its loading. He also includes the code needed to register the provider classes but only in the environments other than "build" and "testing".

On the Laravel News site they have a post about the Laravel Telescope beta that's just been announced. Laravel Telescope is an introspection and debugging tool that integrates with your Laravel application to provide details gathered during execution and issues along the way.

The first beta release of Laravel Telescope is now out and available for everyone. If you are not familiar with Telescope here is the quick overview:

You install it the same way you'd install any other Laravel package via a composer require for laravel/telescope and run the installation and migration steps using the artisan command. This tool is only for Laravel applications and is tightly integrated with the tool. For more information on Telescope, check out its GitHub repository.