laravel/pulse
Laravel Pulse is a real-time performance monitoring tool and dashboard for Laravel apps. Track key runtime metrics, identify slow requests and bottlenecks, and keep tabs on application health in production with minimal setup.
Laravel Pulse is a native Laravel-first monitoring solution, designed to integrate seamlessly with Laravel’s ecosystem (v10+). Its architecture leverages:
PulseServiceProvider).Pulse::record()).Key Fit Criteria: ✅ Monolithic Laravel Apps: Ideal for apps where observability is critical (e.g., SaaS, high-traffic APIs). ✅ Real-Time Needs: Livewire-based dashboard updates without polling (e.g., job queue monitoring). ❌ Microservices/Non-Laravel: Not suitable for polyglot architectures or non-PHP stacks. ❌ Legacy Systems: Requires Laravel 10+ (PHP 8.1+); older versions may need backports.
| Component | Feasibility | Notes |
|---|---|---|
| Core Laravel | High | Zero-config for Laravel 10+; follows Laravel conventions. |
| Livewire | High | Native support for Livewire v3/v4; dashboard relies on it. |
| Queue Workers | High | Monitors queues (Redis, database, Sync) out-of-the-box. |
| Database | Medium | Supports MySQL, PostgreSQL, SQLite; requires proper table prefixes. |
| Third-Party Cards | Medium | Extensible via Pulse::card() but may need custom development. |
| Custom Metrics | High | Pulse::record() allows manual metric injection (e.g., business KPIs). |
Dependencies:
Potential Conflicts:
pulse:trim command).| Risk Area | Severity | Mitigation |
|---|---|---|
| Livewire Dependency | High | Ensure Livewire v3/v4 compatibility; test dashboard in staging. |
| Redis Bottlenecks | Medium | Monitor Redis memory usage; configure pulse:trim for data retention. |
| Custom Metrics Overhead | Low | Benchmark Pulse::record() in high-throughput apps; avoid excessive logging. |
| Laravel Version Lock | Medium | Pin to a stable Pulse version (e.g., 1.7.x) to avoid breaking changes. |
| Database Schema | Low | Migrations are idempotent; backup before running php artisan pulse:install. |
Critical Questions for TPM:
pulse.trim_duration (default: 30 days) to avoid storage bloat.Pulse::record() in production-like loads.Pulse::record() calls?| Stack Layer | Compatibility | Notes |
|---|---|---|
| Backend | High | Laravel 10+; PHP 8.1+ (or 8.2+ for Laravel 11). |
| Frontend | Medium | Requires Livewire (Tailwind CSS for styling). |
| Database | Medium | MySQL/PostgreSQL/SQLite; table prefixes must match Laravel’s. |
| Queue | High | Redis, database, or sync drivers (Relay supported). |
| Cache | High | Uses Laravel’s cache (Redis recommended for performance). |
| CI/CD | Low | No direct impact; test pulse:install in pipelines. |
Non-Negotiables:
composer show laravel/framework).composer show livewire/livewire).composer require laravel/pulse
php artisan pulse:install
http://app.test/pulse.config/pulse.php for slow query/job/request thresholds (e.g., 500ms).'thresholds' => [
'requests' => 500, // ms
'jobs' => 2000, // ms
'queries' => 100, // ms
],
Pulse::record():
Pulse::record('user_activations', 10); // Track custom KPIs
Pulse::card() (see docs).PULSE_QUEUE_CONNECTION in .env matches your queue driver.pulse.queue.driver in config.Pulse::failed(function ($job) {
Notification::route('mail', 'team@example.com')
->notify(new JobFailed($job));
});
Pulse::record() calls in high-traffic endpoints.redis-cli info memory).pulse.trim_duration (default: 30 days) based on storage needs.pulse:trim via cron:
* * * * * php artisan pulse:trim --force
'cards' => [
'livewire' => [
'sortBy
How can I help you explore Laravel packages today?