Start free trial
Start free trial Log in

14-day free trial. No credit card.

How to monitor Laravel in production

The five layers every production Laravel app needs, and the tool decisions that matter.

  • Guide
  • 3 min read

What do I need to monitor in a production Laravel app?

Five layers: (1) exceptions with fingerprinted grouping and alerts, (2) slow SQL queries with per-pattern p95 trending, (3) queue workers and per-class failure rates, (4) scheduled task invocations with missed-run detection, (5) per-route latency with p95 and percentile drilldown. Tool options range from free (Telescope for local dev, or rolling your own) to flat $5/month (NightOwl Hobby) to usage-priced enterprise APMs such as Datadog and New Relic.

Updated

Most Laravel apps are monitored by accident: a log file here, an uptime ping there, a Telescope install someone added in 2023 and forgot. It works right up until an incident, at which point you find the gaps the hard way: the exception that fired for two days before anyone saw it, the slow query nobody was tracking, the queue that silently stopped. Production monitoring done on purpose is a short, ordered list of signals, each answering a question you'll definitely be asked at the worst possible time. This guide is that list, roughly in priority order. Start at the top and stop wherever your app's risk runs out.

Layer 1: Exceptions

The minimum-viable production monitoring. Every uncaught exception needs to surface somewhere within minutes, not days.

What you want per exception:

  • Grouping by fingerprint (10,000 occurrences of the same exception should be one issue)
  • Full stack trace with request context (URL, user, input)
  • First seen / last seen / occurrence count per group
  • Alert channel (Slack, Discord, Email) with rate limiting to prevent spam during incidents
  • Status management (open / resolved / ignored) to track triage

Related: Exception tracking guide

Layer 2: Slow queries

SQL is one of the most common sources of Laravel performance pain. Monitoring requires per-pattern aggregation, not per-query logs.

What you want:

  • Query fingerprinting (bind-parameter normalization so 10K executions roll up into one pattern)
  • Per-pattern p95 duration over any time range
  • N+1 detection across real traffic (not just local dev)
  • Correlation to the route/request that fired each query

Related: Slow query guide, N+1 detection

Layer 3: Queue workers and jobs

Queued work is where silent failures live. Users don't see the error. The job just doesn't run. Essential signals:

  • Failure rate per job class (not aggregate)
  • p95 runtime per job class
  • Queue lag: time from dispatch to start
  • Worker health: are workers processing? Any crashes?

Related: Queue monitoring, Failed job monitoring

Layer 4: Scheduled tasks

The easiest thing to forget. If cron stops running, you might not notice for days.

  • Invocation history (did it run? when?)
  • Duration per task (growing durations = trouble)
  • Missed-run detection (scheduler itself stopped)
  • Dead-man's-switch alert: alert when no tasks have run in N minutes

Related: Scheduled task monitoring

Layer 5: Request latency

Average latency lies. You want p95 per route pattern, with trending.

  • p50, p95, p99 per route pattern
  • Time-series trending (regressions on deploy)
  • Request drill-down: for a slow request, see every DB query and external call
  • Error rate per route (separate from exception tracking, 5xx as a metric)

Related: Slow endpoints, p95 latency

What NOT to prioritize early

Things that look important but aren't where most teams spend their first monitoring dollar:

  • Real-user monitoring (RUM): browser-side latency. Useful eventually, overkill for monolithic Laravel apps early on.
  • Distributed tracing: only matters if you have multiple services. One Laravel app = request-level tracing is enough.
  • Infrastructure metrics: CPU, disk, memory. Your hosting provider's dashboards cover this.
  • Synthetic transaction monitoring: scripted browser replays. Valuable for specific user journeys but lots of setup.

Tool recommendation by team size

Team Tools Monthly cost
Solo devNightOwl Hobby or Nightwatch Cloud + UptimeRobot free$0-5
Small team (up to 5 people)NightOwl Team $15 + Better Stack free plan$15
Agency (multi-client)NightOwl Agency $69 (unlimited apps)$69
Enterprise (compliance)NightOwl Agency (your own PostgreSQL) + a log stack such as ELK + Datadog for infraVaries with hosts and log volume

Start with the layers NightOwl records for you

One agent install records exceptions as grouped issues with alerts, every SQL query by pattern, job p50/p95/p99 per class, scheduled task runs and P95 per route. It doesn't detect missed scheduler runs or queue lag, so keep a heartbeat check for those.

No credit card needed.

Terminal
composer require nightowl/agent
php artisan nightowl:install
php artisan nightowl:agent

Frequently asked questions

Anything else, write to support@usenightowl.com

What do I need to monitor in a production Laravel app?

Five layers cover most of what matters: (1) exceptions with fingerprinted grouping and alert channels, (2) slow SQL queries with pattern-level p95 trending, (3) queue workers, attempts, and per-class failure rates, (4) scheduled task invocations with missed-run detection, (5) per-route latency with p95 trending. Logs and outgoing HTTP are secondary layers. Infrastructure-level uptime is table stakes, covered by a separate uptime tool.

How do I monitor Laravel in production cheaply?

Laravel Telescope is free but built for local development. Hosted tools like Flare, Sentry and Nightwatch cover errors and performance on plans priced by monthly quotas. The cheapest flat-priced BYOD option is NightOwl from $5/mo (Hobby, 1 app) or $15/mo Team (3 apps) with your own Postgres; the price doesn't scale with traffic. Running OpenTelemetry + Grafana on your own servers is free in dollars but expensive in ops time.

Can I monitor Laravel without installing a third-party tool?

Partially. Laravel ships plenty of hooks: DB::listen, event listeners for queue/notification/mail events, the scheduler's onSuccess/onFailure callbacks. You can write everything to your database and build dashboards with Livewire or Filament. It works, but you're committing to maintain a monitoring product alongside your actual product.

What's the first thing I should monitor?

Exceptions. If an exception fires in production and nobody sees it, you have zero visibility. Start with an exception tracker that alerts a Slack channel (Sentry, Honeybadger and Rollbar all have a free plan) or Laravel's built-in slack log channel at the error level, then add performance and queue monitoring once you have baseline error coverage.

How do I know if my Laravel monitoring is actually working?

Trigger a synthetic error in staging or behind a feature flag (a controlled exception) and verify it surfaces in your monitoring within a minute or two. Do the same for a slow query (add a SELECT pg_sleep(2)) and a failing queued job. Any tool that can't reliably surface synthetic failures within its expected latency window isn't ready for production.

Should I use logs or APM for Laravel production monitoring?

Both. Logs capture free-text events, good for auditing and ad-hoc debugging. APM captures structured per-request telemetry, good for aggregation and trending. They answer different questions. A tool like NightOwl does both; or you can run an APM plus a log aggregator like Loki or Better Stack.

What's the difference between monitoring and observability?

Monitoring answers pre-defined questions: 'is the /checkout route slow?'. Observability lets you ask arbitrary questions after the fact: 'which users experienced high latency on Tuesday between 2 and 4 PM?'. Classic APMs lean monitoring; OpenTelemetry + high-cardinality trace backends lean observability. For most Laravel teams, monitoring is sufficient.

How long should I retain Laravel monitoring data?

Minimum 14 days for trend comparisons (week-over-week debugging). 30-90 days covers most post-mortems. SOC 2 sets no fixed retention period; PCI DSS requires 12 months of audit log history (a subset of all monitoring data). With NightOwl, data stays in your own PostgreSQL until you schedule nightowl:prune, which keeps NIGHTOWL_RETENTION_DAYS of raw data (14 days by default) and rollups on their own windows; the dashboard window depends on your plan. You can raise the retention as far as your database has room for.

Related

Flat pricing, whatever your traffic does

Every plan starts with a 14-day free trial. No credit card needed.

Hobby
$5 a month

One app for a side project. Issues and alerts, with a 14-day dashboard window.

Start my 14-day trial
TeamRecommended
$15 a month

Up to 3 apps and 5 people per team. Full history, the MCP server, data clearing and agent health.

Start my 14-day trial
Agency
$69 a month

Unlimited client apps and people, one overview of every app, and apps you can hand over.

Start my 14-day trial