Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nightwatch Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • The licence is not the product. MIT covers the client; the platform is a paid hosted SaaS. The real decision is procurement + vendor management, not code review. Note 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.
  • Pre-2.0 with high cadence. v1.22 → v1.30 in the visible window, many patches per minor. Config and capture behaviour will churn.
  • Data egress. Request context, exception messages, job payloads, log lines, potentially user identifiers leave your perimeter. Needs a data-classification pass before production.
  • Weak public signal. 378 stars is modest for a first-party Laravel package; treat GitHub metrics as low-confidence and substitute a time-boxed pilot.

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.

Integration Approach

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:

  1. Errors/exceptions (replace the incumbent's error alerting first — smallest blast radius, fastest value).
  2. Queue and scheduler visibility.
  3. Performance/traces.
  4. Logs.

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).

Operational Impact

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.

  • Agent not running → telemetry silently dropped. Verify the app degrades gracefully and alerts on agent liveness itself.
  • Ingest outage → buffer growth, then loss (v1.24.1 ingests immediately on overflow, capping memory at the cost of dropped events). Confirm acceptable loss.
  • Serialization failures on exotic job payloads — repeatedly patched upstream; test your custom payloads.
  • Sampling misconfiguration masking an incident — keep an alerting path for your top 5 SLOs that does not depend on Nightwatch.
  • Octane restarts orphaning agent state.

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections