A FIELD GUIDE TO LARAVEL · VOLUME II · THE ECOSYSTEM
ENTRY II.40 · PRODUCTION MONITORING
Nightwatch
Laravel\Nightwatch · Product · first recorded June 2025, launched 16 June (monitor:704)
Laravel's hosted monitoring. A package records requests, jobs, commands, queries, exceptions and logs as linked events, hands them to a local agent over TCP, and the agent ships them on. The dashboard draws them as one timeline.
Specification
Kind Hosted service, plus a package and a resident agent
Protocol App to agent at 127.0.0.1:2407, buffered 500 events at a time
Client nightwatch.laravel.com; Slack, Linear, webhooks and an MCP server
Installed by composer require laravel/nightwatch · NIGHTWATCH_TOKEN=
Voice nightwatch:agent · nightwatch:status
Scales by Sample rates for requests, commands, scheduled tasks and exceptions
Range Cloud: built in: a toggle, the agent on every cluster, 10% of requests sampled
Forge, VPS: Forge connects it in one click; elsewhere a supervised nightwatch:agent per app, one port each
Vapor: the agent on a separate EC2 box; Lambda cannot host it
Neighbours
Telescope is the local debugger, storing every entry in your own database. Pulse is an aggregate dashboard inside your app, with slow requests, queues and busy users. Nightwatch's distinction is hosted production monitoring, with each request linked to the jobs and queries it caused.
Field marks
NIGHTWATCH_TOKEN
NIGHTWATCH_REQUEST_SAMPLE_RATE
NIGHTWATCH_ENABLED=false in phpunit.xml
Nightwatch facade
Fig. II.40.1 · One request, as events
Parts
1 Entry point. A request, a command or a scheduled task. If it is sampled in, its whole trace is kept; if not, none of it.
2 Child events. Queries, cache hits, dispatched jobs, outgoing requests, mail, exceptions and logs, linked to the parent.
3 Sample, filter, redact. Rates per entry point; Nightwatch::ignore(); sensitive headers and payload fields removed before sending.
4 Buffer. Up to 500 events, then flushed to the agent over TCP, with half-second connect and send timeouts.
5 Agent. nightwatch:agent, one resident process per application, listening on port 2407 and shipping to Nightwatch.
6 Nightwatch. The hosted side: timelines, issues made from exceptions, alerts; data in the US, EU or Australia.
Hidden joinery
Exceptions sample at 1.0 by default, so an execution that throws is kept even when its request was not. Request payloads are off by default; auth headers and password fields are redacted in the app. A separate agent must track the package version. SOC 2 Type 1 attested October 2025 (monitor:627).
Every line checked on 2026-10-08 against nightwatch.laravel.com/docs, the package source and Monitor.
TITLE
Nightwatch · every event, traced
SOURCES
nightwatch.laravel.com/docs/start-guide · nightwatch.laravel.com/docs/filtering · nightwatch.laravel.com/docs/environment-variables · nightwatch.laravel.com/docs/guides/cloud · nightwatch.laravel.com/docs/guides/forge · nightwatch.laravel.com/docs/guides/vapor · nightwatch.laravel.com/docs/guides/docker · nightwatch.laravel.com/docs/exceptions · nightwatch.laravel.com/docs/llms.txt · github.com/laravel/nightwatch/blob/main/config/nightwatch.php · github.com/laravel/laravel/blob/13.x/phpunit.xml · repo.packagist.org/p2/laravel/nightwatch.json · laravel.com/docs/13.x/telescope · laravel.com/docs/13.x/pulse · Monitor 704, 627, 662
STATUS
Verified · 2026-10-08
SHEET
II.40 of 48
REV
A · 2026-10-08
DRAWN
BS
FINISH
All faces, including the back