Express Performance Monitoring
Errors and traces for your Express applications. Scout's Node.js agent automatically traces route handlers, detects N+1 queries in Prisma and raw SQL, and connects exceptions to the exact request that caused them. Supports Express 4 and 5 on Node.js 18+.
Errors and Traces in One View for Express Apps
Scout combines error monitoring and transaction tracing into a single view for your Express application. When a route handler throws an exception or an error-handling middleware fires, you see the error and the full request trace together. No switching between Sentry and your APM.
Error Monitoring
Automatic capture of uncaught exceptions, unhandled promise rejections, and errors passed to Express error-handling middleware. Every error is linked to the request trace that produced it. You can also call captureError() for errors you catch and handle in your own code.
App Traces
Transaction tracing with visibility into Express route handlers, template rendering, database queries, and external HTTP calls. Backtraces show the exact line of code responsible for slow responses.
N+1 Detection and Query Analysis in Prisma and Raw SQL
Scout automatically detects N+1 query patterns in Prisma and raw SQL without configuration. The agent monitors database queries across Express route handlers, identifying repeated query patterns and showing the exact code location and performance impact. Supports PostgreSQL (pg), MySQL (mysql2), and MongoDB.
Route Handlers, Databases, and Caches Out of the Box
Scout auto-instruments the libraries your Express application already uses. Express 4 and 5 route handlers are covered at the framework level. Prisma 6+, PostgreSQL (pg), MySQL (mysql2), MongoDB 4+, ioredis 5+, and node-redis 5+ are instrumented automatically. Template engines EJS, Pug, and Mustache are traced. HTTP calls via fetch, Axios, and the built-in http module are captured with zero configuration.
Works with the Express frameworks you already use
Scout auto-instruments the frameworks and libraries in your stack. No manual configuration required.
Express Framework
- Express 4
- Express 5
- Route Handlers
Template Engines
- EJS
- Pug
- Mustache
Databases
- Prisma
- PostgreSQL (pg)
- MySQL (mysql2)
- MongoDB
Caching
- ioredis
- node-redis
Query Your Express 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 Express application's errors, traces, query performance, and route timing 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 Express App
Get Scout running on your Express app in under 3 minutes.
Install the package:
npm install @scout_apm/scout-apmCreate scout.js with your app name and key. Require it first in your entry point, before other packages.
Add middleware:
app.use(expressMiddleware({ requestTimeoutMs: 0 }));
// ... routes ...
app.use(errorMiddleware());Set environment variables: SCOUT_MONITOR=true, SCOUT_KEY, SCOUT_NAME.
Deploy and see data in 5 minutes.
Express Monitoring FAQ
What is the best APM for Express?
Scout Monitoring provides integrated errors and traces for Express applications. The Node.js agent includes N+1 detection and query analysis across Prisma and raw SQL, route handler tracing, and auto-instrumentation for databases, caches, and HTTP calls. Scout is built for development teams that want all their monitoring signals in one place.
How do I monitor Express performance in production?
Scout instruments Express 4 and 5 with zero-configuration tracing. Every request is traced through route handlers with per-operation timing. Database queries, cache operations, and external HTTP calls are captured automatically. Install the @scout_apm/scout-apm package, add the Scout middleware, and deploy.
What is the best error monitoring for Express?
Scout captures uncaught exceptions, unhandled promise rejections, and errors passed to Express error-handling middleware automatically. Each error is linked to the originating request trace. Errors are grouped and enriched with request details so you know which routes and users are affected.
How does Scout detect N+1 queries in Express apps?
Scout automatically detects N+1 query patterns within Express route handlers, capturing execution time and the code location that triggered each query. Repeated query patterns are flagged so you can fix them before they cause performance problems. Prisma 6+, PostgreSQL (pg), MySQL (mysql2), and MongoDB are all supported without configuration.
How does Scout compare to New Relic and Datadog for Express?
Scout is built for development teams, not operations teams managing large infrastructure. It includes automatic N+1 detection and query analysis without configuration and starts at $19 per month. If you want an APM that understands your Express routes rather than treating them as generic HTTP spans, Scout is the better fit.
Can I use Scout with Claude Code or Cursor for Express 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 Express application's errors, traces, and query performance in natural language from your editor. The Scout CLI, available via Homebrew, provides terminal access to the same data in TOON format for LLM consumption.