Do you know that Laravel have a code execution monitoring package?

This class of tools collects relevant information about application performance, errors, and trends and gives you a visual representation of what your application is doing during its normal operation.

Patrick Wan

--

inspector

Today we gonna introduce a package name’s Inspector. Inspector is a composer package to add real-time code execution monitoring to your Laravel application. It allows you to work on continuous code changes while catching bugs and bottlenecks in real-time. Before users do.

It takes less than one minute to get started. Let’s see how it works.

Install the composer package

Run the composer command in your terminal:

composer require inspector-apm/inspector-laravel

Configure the Ingestion key

Get a new Ingestion key by signing up for Inspector (https://app.inspector.dev/register) and creating a new project, it only takes a few seconds.

You’ll see installation instructions directly in the app screen:

instruction-screen

Put the Ingestion Key in your environment file:

INSPECTOR_INGESTION_KEY=9a304b04b8XXXXXXXXXXXX

Test everything is working

Execute our test command to check if your app send data to inspector correctly:

1php artisan inspector:test

Go to (https://app.inspector.dev/home)[https://app.inspector.dev/home] to explore your demo data.

By default Inspector monitors:

  • Database interactions
  • Queued Jobs execution
  • Artisan commands
  • Email sent
  • Notifications
  • Unhandled Exceptions

We turned on the light in the 50% of our app executed in the background. The next step…

--

--

Patrick Wan

My name’s Patrick. I’m a Software Developer, experience in Laravel, Vue Js, React Js, Livewire, Jquery, Codegniter, NPM, GIT. I have 5 years plus experience.