PHP Performance Monitoring
Get deep performance insights for your Laravel, Lumen, and Symfony applications. Scout's PHP agent automatically instruments your code with minimal overhead, supporting PHP 7.2 through 8.3.
Three signals, one view for PHP apps
Scout captures errors, logs, and traces from your PHP application and connects them in a single view. When a Laravel controller throws an exception or a Symfony route returns a 500, you see the error, the full request trace including middleware, database queries, and template rendering, and the surrounding log lines together. No tab switching, no correlation by timestamp.
Error Monitoring
Automatic exception capture across Laravel, Lumen, and Symfony. 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 or Symfony application was doing before, during, and after an issue without switching tools.
App Traces
Transaction tracing with code-level visibility into middleware, controllers, database queries, job queues, and template rendering. Detailed backtraces show the exact line of code responsible.
N+1 Detection in Eloquent and Doctrine
Scout automatically detects N+1 query patterns in both Eloquent and Doctrine without configuration. The agent monitors PDO queries within Laravel and Symfony request handling, background jobs, and queue workers, identifying repeated query patterns and showing the code location and performance impact of each N+1.
What Scout instruments in your PHP app
Scout's PHP agent auto-instruments the libraries your Laravel, Lumen, or Symfony application already uses. PDO database queries, Predis and PhpRedis calls, Elasticsearch and MongoDB operations, Memcached lookups, and libcurl HTTP requests are all captured automatically. Laravel-specific instrumentation covers middleware, controllers, SQL queries, job queues, and Blade rendering. Symfony-specific instrumentation covers controllers, Doctrine SQL queries, and Twig rendering. Install the optional native PHP extension via pecl for even deeper instrumentation.
PHP libraries and frameworks auto-instrumented by Scout
- Laravel
- Lumen
- Symfony
- Eloquent
- Doctrine
- PDO
- Blade
- Twig
- Predis
- PhpRedis
- Elasticsearch
- MongoDB
- Memcached
- libcurl
Memory Bloat Detection for PHP
PHP processes can accumulate memory within a request lifecycle, especially in long-running queue workers, batch jobs, and Artisan commands. Scout detects memory bloat at the application level, showing which code paths and controller actions 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 PHP App Data from AI Assistants and the Terminal
Scout offers hosted and local MCP servers with 17 tools, a Go CLI via Homebrew with TOON format, and a public API. Query your Laravel or Symfony application's errors, traces, N+1 issues, and job queue performance from your AI coding assistant 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 PHP App
Get started in under 3 minutes with our easy to install PHP agent.
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.
PHP Monitoring FAQ
What is the best application monitoring tool for PHP?
Scout Monitoring provides integrated errors, logs, and traces for PHP applications running Laravel, Lumen, and Symfony. The PHP agent includes automatic N+1 detection in Eloquent and Doctrine, error monitoring, log management with trace context, and auto-instrumentation for PDO, Predis, PhpRedis, Elasticsearch, MongoDB, Memcached, and libcurl. Scout is built for development teams that want all their monitoring signals in one place without enterprise complexity.
What is the best APM for PHP?
Scout is a PHP APM built for developers working with Laravel, Lumen, and Symfony. It combines error monitoring, log management, and transaction tracing in a single tool. Auto-instrumentation covers middleware, controllers, database queries, job queues, Blade and Twig rendering, and external service calls. N+1 detection works automatically in both Eloquent and Doctrine. Scout supports PHP 7.2 through 8.3.
How do I detect N+1 queries in Laravel and 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, identifying repeated query patterns and showing the exact code location, the number of excess queries, and the performance impact. No manual annotation or query logging setup is required.
Does Scout support error monitoring for PHP applications?
Yes. Scout captures exceptions across Laravel, Lumen, and Symfony applications 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 Symfony monitoring?
Yes. Scout's PHP agent supports Symfony 4.0 and later. Auto-instrumentation covers Symfony controllers, Doctrine SQL queries with N+1 detection, and Twig template rendering. PDO, Predis, PhpRedis, Elasticsearch, MongoDB, Memcached, and libcurl are also instrumented automatically. Error monitoring, log management, and transaction tracing all work with Symfony out of the box.
Can I use my AI coding assistant with Scout for PHP apps?
Yes. Scout offers multiple paths into your PHP monitoring data from AI tools. The MCP server (hosted or local) works with any MCP-enabled assistant including Claude Code, Cursor, and VS Code Copilot, letting you query errors, traces, and N+1 insights in natural language from your editor. The Scout CLI, available via Homebrew, gives you terminal access to the same data and outputs in TOON format when piped, which is specifically designed for LLM consumption. There is also a public API for building custom integrations.
What is Scout's overhead on PHP applications?
Scout's PHP agent is designed for minimal overhead in production. The base agent uses lightweight instrumentation hooks that do not materially impact your application's response times. For deeper instrumentation, the optional native PHP extension (installed via pecl install scoutapm) provides lower-overhead data collection than pure PHP alternatives.