Laravel Performance Monitoring
Errors, logs, and traces for your Laravel applications. Scout's PHP agent automatically instruments Laravel middleware, controllers, Eloquent queries, job queues, and Blade rendering with minimal overhead. Supports PHP 7.2 through 8.3.
Errors, Logs, and Traces in One View for Laravel Apps
Scout connects Laravel exceptions to the full request trace and surrounding log lines in a single view. When a controller throws an exception or a queue job fails, you see the error, the request trace including middleware, Eloquent queries, and Blade rendering, and the surrounding log lines together. No tab switching, no correlation by timestamp.
Error Monitoring
Automatic exception capture across Laravel controllers, middleware, and queue workers. Errors are linked to the request trace that caused them, with full stack traces, request parameters, and custom context attached.
Log Management
Log output is enriched with trace context and forwarded alongside performance data. See what your Laravel application was doing before, during, and after an issue without switching tools.
App Traces
Transaction tracing with code-level visibility into Laravel middleware, controllers, Eloquent queries, job queues, and Blade template rendering. Detailed backtraces show the exact line of code responsible for slow requests.
N+1 Detection in Eloquent, Automatically
Scout automatically detects N+1 query patterns in Eloquent without configuration. The agent monitors PDO queries within Laravel request handling, queue workers, and Artisan commands, identifies repeated query patterns triggered by lazy-loaded relationships, and shows the exact code location and performance impact of each N+1.
What Scout Instruments in Your Laravel App
Scout's PHP agent auto-instruments Laravel at the framework level. Middleware, controllers, Eloquent SQL queries, job queues, and Blade rendering are all captured automatically. PDO database queries, Predis and PhpRedis calls, Elasticsearch and MongoDB operations, Memcached lookups, and libcurl HTTP requests are instrumented with no additional configuration. Install the optional native PHP extension via pecl for even deeper instrumentation.
Works with the Laravel frameworks you already use
Scout auto-instruments the frameworks and libraries in your stack. No manual configuration required.
Laravel
- Laravel
- Lumen
- Laravel Octane
Databases
- Eloquent
- PDO
- MongoDB
- Elasticsearch
- Memcached
Caching and Queues
- Predis
- PhpRedis
- Laravel Queues
Templating
- Blade
HTTP
- libcurl
Memory Bloat Detection for Laravel
Laravel queue workers and Artisan commands can accumulate memory over time, especially when processing large datasets or holding references across jobs. Scout detects memory bloat at the transaction level, showing which controller actions, queue jobs, and code paths are responsible for memory growth. This goes beyond host-level metrics by telling you what is causing the increase, not just that it is happening.
Query Your Laravel App Data from AI Assistants and the Terminal
Scout offers hosted and local MCP servers with 17 tools, a Go CLI available via Homebrew with TOON format for LLM output, and a public API. Query your Laravel application's errors, traces, Eloquent N+1 insights, and queue performance from Claude Code, Cursor, or the terminal.
MCP Server
Hosted or local MCP server with 17 tools covering apps, endpoints, traces, errors, insights, background jobs, and usage data. Works with Claude Code, Cursor, VS Code Copilot, and any MCP-enabled assistant.
Scout CLI
Go binary available via Homebrew. Query app metrics, endpoint performance, traces, error groups, and insights from the terminal. Outputs human-friendly tables or TOON format for LLM consumption.
Public API
Full programmatic access to your monitoring data for building custom integrations, dashboards, or automation workflows.
Add Scout to Your Laravel App
Get Scout running on your Laravel app in under 3 minutes.
Install the package:
composer require scoutapp/scout-apm-laravelOptionally install the PHP extension for deeper instrumentation:
sudo pecl install scoutapmConfigure in your .env file and deploy.
Laravel Monitoring FAQ
What is the best monitoring tool for Laravel?
Scout Monitoring provides integrated errors, logs, and traces for Laravel applications. The PHP agent includes automatic Eloquent N+1 detection, error monitoring, log management with trace context, and auto-instrumentation for PDO, Predis, PhpRedis, Elasticsearch, MongoDB, Memcached, and libcurl. Scout is built for Laravel teams that want all their monitoring signals in one place without enterprise complexity.
What is the best APM for Laravel?
Scout is a PHP APM built for developers working with Laravel and Lumen. It combines error monitoring, log management, and transaction tracing in a single tool. Auto-instrumentation covers middleware, controllers, Eloquent queries, job queues, Blade rendering, and external service calls. N+1 detection works automatically in Eloquent. Scout supports PHP 7.2 through 8.3.
How do I detect N+1 queries in Eloquent?
Scout automatically detects N+1 query patterns in Eloquent without any configuration. The agent monitors PDO queries within Laravel request handling, queue workers, and Artisan commands, identifies repeated query patterns from lazy-loaded relationships, and shows the exact code location, the number of excess queries, and the performance impact. No manual query logging or annotation required.
How do I monitor Laravel queue workers?
Scout auto-instruments Laravel queue jobs out of the box. Each queued job appears as its own transaction in Scout with execution timing, error tracking, and Eloquent N+1 detection. Memory bloat analysis applies to queue workers the same way it applies to web requests. You can see which job classes are slowest, which are failing, and which are growing memory.
Does Scout support error monitoring for Laravel?
Yes. Scout captures exceptions across Laravel controllers, middleware, and queue workers automatically. Each error is linked to the request trace that caused it, with full stack traces, request parameters, and custom context attached. You see the error, the trace, and surrounding log lines in one view.
Does Scout support Laravel Lumen?
Yes. Scout's PHP agent supports both Laravel and Lumen. Auto-instrumentation covers controllers, PDO queries with Eloquent N+1 detection, and external service calls. Error monitoring, log management, and transaction tracing all work with Lumen out of the box.
What is Scout's overhead on Laravel applications?
Scout's PHP agent is designed for minimal overhead in production. The base agent uses lightweight instrumentation hooks that do not materially impact response times. For deeper instrumentation, the optional native PHP extension installed via pecl install scoutapm provides lower-overhead data collection than pure PHP alternatives.
Can I use Scout with Claude Code or Cursor for Laravel debugging?
Yes. Scout offers hosted and local MCP servers with 17 tools that work with Claude Code, Cursor, VS Code Copilot, and any MCP-enabled assistant. You can query your Laravel application's errors, slow endpoint traces, Eloquent N+1 insights, and queue job performance in natural language from your editor. The Scout CLI, available via Homebrew, gives terminal access to the same data in TOON format for LLM consumption.