laravel/nightwatch
Official Laravel Nightwatch package gathers performance metrics inside your Laravel application and securely transmits them to the Nightwatch hosted monitoring platform, delivering deep, Laravel-optimized insights into your app's performance for unparalleled visibility.
Architecture fit. Nightwatch is an opt-in instrumentation layer, not a library you call. Composer install plus env config; Laravel package auto-discovery wires the service provider and event hooks. From the repo layout and changelog, the design is two-component: an in-app collector that captures framework events, and a co-located agent process (its own agent/ composer manifest, symfony/process dependency, digest timers, buffering) that batches and ships to Nightwatch's hosted ingest endpoint. That's the right call — request latency is decoupled from network I/O — but it introduces a supervised sidecar per host that the TPM must budget for in the deployment topology.
The instrumented surface is broad and Laravel-shaped rather than generic: exceptions (honouring ExceptionHandler::dontReport), queue jobs including enum queues, the scheduler (incl. vapor:schedule), views (deep unwrapping of view exceptions), log channels, cache, Livewire noise suppression, Octane command exclusion, and GCP cloud trace-ID propagation. For a Laravel-only estate this beats bolting a generic APM onto framework internals.
Integration feasibility. High for a conventional Laravel app: enable in config, set a token, ship. The non-trivial cases are Octane (long-lived workers vs. agent lifecycle), Vapor (process model on Lambda), multi-tenant attribution, and non-standard queue drivers. Those are the pilot's job to prove, not the README's.
Technical risk.
dependents: 0 is an artifact of it being an app-level dependency, not a quality signal — but it does mean no downstream ecosystem to lean on.Key questions for the vendor. Pricing/ingest-volume model and overage behaviour; data residency and retention; any self-hosted/on-prem path; exactly what is captured by default and what is redactable; agent CPU/memory at p95; behaviour when ingest is unreachable; SLA and support tier; whether parallel running with existing APM causes double-instrumentation overhead.
Stack fit. Laravel 10–13 (13 landed in v1.24.0), PHP 8.x, works alongside Octane, Vapor, queue workers and the scheduler. Dependency ranges have been widened repeatedly (Guzzle major, "widen dependency versions") — encouraging for Composer conflict risk in a mature app.
Migration path — parallel, not rip-and-replace. Run Nightwatch beside the incumbent for one quarter, cut over per signal class:
If the incumbent is Telescope (dev-only), Nightwatch is an addition, not a migration. If it's Sentry/Datadog/New Relic, decide explicitly which system is the system of record per signal type before rollout, or you will pay twice and page twice.
Compatibility checks. Agent against your base image and process supervisor (systemd/supervisord/s6); outbound egress to the ingest endpoint through corporate proxies; Octane worker restart semantics; multi-tenant scoping.
Sequencing. Local dev (verbose, high sampling) → CI (disabled or heavily sampled) → staging at production-like volume → production canary on 1–2 instances with sampling throttled → fleet rollout → tune sampling and per-app/env ingestion limits. Add nightwatch:deploy to the release pipeline so deploys correlate to metric shifts (falls back to VAPOR_COMMIT_HASH on Vapor).
Maintenance. Pin the minor and review the changelog monthly; auto-updating a pre-2.0 telemetry agent on a fast cadence is an unnecessary risk. Ship the agent as a versioned artifact alongside the app and never let the two drift.
Support. First-party maintainers with strong Laravel pedigree, but support is gated behind the subscription and there is no downstream community to crowd-source answers from. Plan for "open a ticket," not "search Stack Overflow." Budget for someone owning the vendor relationship.
Scaling. Cost and load are per-event, so this is a sampling and configuration problem, not a capacity problem. Use per-app/env ingestion limits (v1.29) and Nightwatch::digest for proactive flushing; bound buffer memory deliberately.
Failure modes to design for.
Ramp-up. Developers: half a day (config, dashboards, reading traces). SRE/on-call: a written runbook covering agent supervision, egress/firewall, PII redaction, sampling policy, and an explicit "Nightwatch is down, now what." Assign one owner for sampling and cost hygiene — that is where ongoing drift and surprise bills accumulate.
Verdict. Low-friction, high-fit bet for a Laravel-centric org with weak production observability. Materially less compelling if you already have deep APM investment or hard data-residency constraints — in which case the pilot should be scoped to evaluating it as an error/queue specialist rather than a full replacement.
How can I help you explore Laravel packages today?