Profile Laravel requests, queues, and Artisan commands with production-ready performance monitoring
Perfbase helps Laravel teams find slow routes, N+1 queries, background job regressions, and command bottlenecks with one package and minimal setup.
Why teams choose Perfbase for Laravel
Auto-discovered package with middleware and events
Works across HTTP, queue, and Artisan contexts
Fail-open design for production Laravel apps
Laravel
Automatic performance monitoring for Laravel applications
Supported versions
Laravel 8-13
Quick install
composer require perfbase/laravelStarter config
# .env
PERFBASE_ENABLED=true
PERFBASE_API_KEY=your-api-keyUse cases
Why teams use Perfbase for Laravel
Perfbase is built for teams that need more than a local debug toolbar. It brings production-facing traces, framework-specific context, and shared visibility across the slow paths that matter most in Laravel.
Catch slow routes before users do
See which controllers, middleware, and database calls are stretching request time in production.
Debug queue and scheduler regressions
Profile queued jobs and Artisan commands without adding one-off instrumentation to every workload.
Give the whole team the same view
Turn framework-specific traces into something developers, leads, and reviewers can all act on quickly.
Profiling coverage
What gets profiled and how Perfbase works in Laravel
Perfbase stays framework-aware while keeping setup light. These are the behaviors and operational paths this integration is built to expose.
HTTP profiling
Profile every HTTP request via middleware. Add it to your stack and you are done.
Queue job profiling
Queue jobs are profiled automatically via Laravel event listeners with no job-level code changes.
Artisan command profiling
Console commands are profiled automatically so maintenance and deployment scripts are visible too.
Include and exclude filters
Filter by route pattern, regex, or controller reference with separate rules for HTTP, queue, and console.
Per-user profiling control
Implement ProfiledUser on your User model to decide which authenticated users should be profiled.
Facade access
Use the Perfbase facade to attach attributes or add manual spans alongside automatic instrumentation.
Setup preview
How to get started with Perfbase in Laravel
Start with install, configuration, and the first framework-specific profiling steps here. When you want full implementation detail, each card links directly into the complete guide.
Installation
Install the Perfbase PHP extension first. This is what does the actual profiling:
Open docs section →
Configuration
Publish the config file for full control:
Open docs section →
HTTP middleware
Add PerfbaseMiddleware to your middleware stack to profile HTTP requests:
Open docs section →
Queue profiling
Queue jobs are profiled automatically via event listeners. No middleware is required. The service provider listens for JobProcessing, JobProcessed, and JobExceptionOccurred events.
Open docs section →
FAQ
Laravel profiler and performance monitoring FAQ
Can Perfbase profile Laravel queues and Horizon workers?
Yes. Perfbase profiles queued jobs automatically via Laravel queue events, so Horizon-backed workers and queue-heavy workloads remain visible without job-level instrumentation.
Will Perfbase slow down my Laravel production app?
Perfbase is designed to fail open and keep application overhead low. Sampling and filtering happen early so unsampled requests avoid most profiling cost.
Does Perfbase help with Laravel N+1 queries?
Yes. Perfbase captures database activity alongside request traces so you can spot repeated query patterns, slow Eloquent calls, and route-specific regressions quickly.
Start profiling
Ready to start profiling production traffic?
Create a project, install the package, and start capturing framework-level traces in minutes.