Announcing Laravel Pulse - A New Performance Monitoring Tool for Laravel Apps

Published on by

Laravel Pulse is a brand new free and open source performance monitoring and insights tool for Laravel applications. It was announced at Laracon AU 2023 by Jess Archer from the Laravel core team.

What is Laravel Pulse?

Laravel Pulse gives you an aggregate view of performance data for your Laravel app. It tracks metrics like:

  • System stats (CPU, memory, storage usage)
  • Application usage (requests, slow routes, jobs, etc)
  • Queue throughput
  • Slow jobs
  • Slow queries
  • Exceptions
  • Cache hits/misses
  • Outgoing request times

Pulse was designed specifically for Laravel and knows about all the core components like queues, events, mail, notifications, caching, and more.

It collects the minimal amount of data needed to display helpful insights. The data is saved locally so you maintain full control.

Laravel Pulse is self-hosted and works anywhere Laravel runs - VPS, Laravel Forge, Vapor, etc. It has a responsive UI with light and dark modes.

And best of all, it's completely free and open source! Big thanks to Taylor Otwell for making this possible.

How Pulse Compares to Telescope

Some may be wondering how Pulse compares to Laravel Telescope, another debugging tool for Laravel.

Telescope is great for local development as it records extensive request data like all queries and events. But this high level of detail makes it less ideal for production.

Laravel Pulse provides high level aggregate data so it's lean and production-ready. It won't replace error trackers, but augments them nicely.

Interactive Live Demo

At Laracon AU, Jess Archer did an interactive live demo of Laravel Pulse using the audience's phones!

The audience acted as flight admins for a fictional Acme Airlines app. They could perform actions like:

  • Sell tickets
  • Raise prices
  • Delay flights
  • Cancel flights

Meanwhile, Jess showed how Laravel Pulse tracked these actions in real-time on a dashboard.

Here's a recap of some highlights:

Application Usage

The Application Usage card shows:

  • Top users by requests
  • Top users by slow endpoints
  • Top users queuing jobs

This gives insight into who is using your app and any performance issues they face.

Slow Routes

The Slow Routes card shows any application routes that exceed a configured threshold (1 second default).

It displays the route name and action method so you can pinpoint the slow code.

Slow Jobs

The Slow Jobs card is similar, displaying queued jobs exceeding a threshold. It shows the job class name and location.

Failed jobs that retry will increment the count each time so you can spot problem jobs.

Slow Queries

The Slow Queries card reveals queries over a threshold. It only shows the SQL without bindings so it:

  • Obfuscates PII
  • Aggregates identical queries into one result
  • Shows file location the query occurred

You can optionally disable locations to further aggregate results.

Exceptions

The Exceptions card tracks exceptions thrown including location, count, and last occurrence.

You can also sort by most recent exceptions.

Cache

The Cache card tracks cache key usage, along with hits and misses to the cache.

It will make no assumptions about your keys, but allows regrouping and rolling-up of collected data if you need a more generalised view of the data.

Outgoing Requests

Laravel's HTTP client usage is tracked in Outgoing Requests. You can see slow external requests your app makes.

The demo used a regex in the config file to condense unique URLs into a generalised domain name, similar toe cache data.

Customizing Your Dashboard

The Pulse blade file can be published and customized. For example, you can:

  • Toggle full width mode
  • Adjust number of columns
  • Set card span and position
  • Break cards into individual sections

You can also create your own custom cards to display business-specific metrics. The demo included a "Flights" card showing tickets sold, revenue, delays, and top sellers.

Performance Considerations

Pulse collects minimal data and can handle heavy production workloads. Larave Forge runs it for 2 million requests/day with no sampling needed.

By default, Pulse saves request data to your database after the response is sent. Some options to scale:

  • Use a dedicated Pulse database
  • Redis ingest to queue and saved outside request cycle
  • Run Pulse on a separate server
  • Enable sampling for high traffic
  • Create custom data drivers

When Can We Use Pulse?

Laravel Pulse is expected to launch in the next week or so. It will be a composer require away. Stay tuned for the official release!

Conclusion

Laravel Pulse provides easy insights into your Laravel app's performance and usage. Its customizability and minimal overhead makes it a great open source addition for any Laravel project.

Big thanks to the entire Laravel team for another amazing free tool for the community!

Michael Dyrynda photo

Dad, Laravel News Podcast co-host, and Laracon AU organiser.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate logo

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate

Build your SaaS application in hours. Out-of-the-box multi-tenancy and seamless Stripe integration. Supports subscriptions and one-time purchases, allowing you to focus on building and creating without repetitive setup tasks.

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB

The latest

View all →
Asymmetric Property Visibility in PHP 8.4 image

Asymmetric Property Visibility in PHP 8.4

Read article
Access Laravel Pulse Data as a JSON API image

Access Laravel Pulse Data as a JSON API

Read article
Laravel Forge adds Statamic Integration image

Laravel Forge adds Statamic Integration

Read article
Transform Data into Type-safe DTOs with this PHP Package image

Transform Data into Type-safe DTOs with this PHP Package

Read article
PHPxWorld - The resurgence of PHP meet-ups with Chris Morrell image

PHPxWorld - The resurgence of PHP meet-ups with Chris Morrell

Read article
Herd Executable Support and Pest 3 Mutation Testing in PhpStorm 2024.3 image

Herd Executable Support and Pest 3 Mutation Testing in PhpStorm 2024.3

Read article