Weave Code
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

Laravel Nightwatch package for Laravel apps: collects performance and application metrics and securely sends them to the hosted Nightwatch monitoring platform, providing deep Laravel-optimized insights into runtime behavior and overall health.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Observability & Performance Roadmap: Integrate real-time application monitoring into Laravel-based products to proactively detect performance bottlenecks, errors, and anomalies (e.g., slow queries, failed jobs, or unhandled exceptions). Aligns with initiatives to reduce MTTR (Mean Time to Resolution) and improve SLOs/SLIs.
  • Build vs. Buy: Buy (Leverage Nightwatch) instead of building a custom monitoring solution, reducing dev effort and maintenance overhead. Avoids reinventing wheel for metrics collection, sampling, and visualization.
  • Use Cases:
    • Production Monitoring: Track HTTP requests, queue jobs, scheduled tasks, and database queries in real-time.
    • Error Tracking: Capture and redact sensitive data from exceptions (e.g., stack traces, payloads) for debugging without exposing PII.
    • Deployment Tracking: Monitor deployments via nightwatch:deploy command to correlate performance with releases.
    • Sampling Optimization: Reduce noise by configuring sample rates for commands, queries, or tasks (e.g., sample 10% of slow queries).
    • Octane/Livewire Support: Monitor serverless/async workloads (e.g., Octane workers, Livewire interactions) with granular metrics.
    • Cost Efficiency: Avoid over-instrumentation by ignoring irrelevant metrics (e.g., vendor commands, cache keys) via configurable filters.

When to Consider This Package

  • Adopt if:

    • Your Laravel app is production-critical and lacks observability (e.g., no APM, slow query detection, or error tracking).
    • You need Laravel-native monitoring without vendor lock-in (MIT license, open-source).
    • Your team prioritizes developer experience (e.g., easy setup via composer require, CLI commands like nightwatch:deploy).
    • You require fine-grained control over sampling (e.g., ignore queue:listen or redact exceptions).
    • Your stack includes Octane, Livewire, or queues, where async performance is critical.
    • You want to reduce alert fatigue by filtering noise (e.g., ignore schedule:finish commands).
  • Look elsewhere if:

    • You need multi-language support (Nightwatch is Laravel-specific).
    • Your app uses non-Laravel frameworks (e.g., Symfony, Django).
    • You require advanced distributed tracing (consider OpenTelemetry or Datadog APM).
    • Your budget prohibits hosted services (Nightwatch is a SaaS; self-hosting isn’t supported).
    • You already have a mature observability stack (e.g., New Relic, Sentry) with deep Laravel integration.

How to Pitch It (Stakeholders)

For Executives:

*"Laravel Nightwatch is a turnkey observability solution for our Laravel apps, reducing downtime and debugging time by 30–50%. It’s like ‘New Relic for Laravel’—but built by the Laravel team, so it’s native, lightweight, and cost-effective. For $X/month, we get:

  • Real-time alerts on slow queries, failed jobs, or errors (with payload redacting for security).
  • Deployment correlation to track performance regressions post-release.
  • Sampling controls to avoid metric overload (e.g., ignore vendor commands).
  • Zero dev lift—just install the package and configure our Nightwatch API key. Competitors like Sentry or Datadog require custom instrumentation and higher costs."*

For Engineering:

*"This is the official Laravel package for Nightwatch, a hosted monitoring platform. Key benefits:

  • Plug-and-play: Add laravel/nightwatch to composer.json, set an API key, and start collecting metrics without code changes.
  • Laravel-optimized: Captures HTTP requests, queues, scheduled tasks, and database queries with minimal overhead.
  • Sampling & Filtering: Configure NIGHTWATCH_COMMAND_SAMPLE_RATE or ignore specific commands (e.g., queue:listen) to reduce noise.
  • Security: Redact exceptions or sensitive data (e.g., request payloads) before sending to Nightwatch.
  • Octane/Livewire Ready: Tracks async workloads (e.g., Octane workers, Livewire interactions) out of the box.
  • CLI Integration: Deployments auto-log via php artisan nightwatch:deploy for release correlation.
  • Future-Proof: Actively maintained (releases every 1–2 months), with Laravel 13/PHP 8.5 support.

Trade-offs:

  • Hosted service (not self-hostable).
  • Limited to Laravel (no multi-language support).

Next Steps:

  1. Pilot: Install in staging and validate metrics for critical paths (e.g., checkout flow, API endpoints).
  2. Configure: Set sampling rates and filters to avoid alert fatigue.
  3. Integrate: Connect alerts to PagerDuty/Slack for on-call teams.
  4. Iterate: Use Boost skills (e.g., configure-nightwatch) to customize dashboards.

Cost: ~$X/month (vs. $Y for Sentry/Datadog). ROI: Faster incident resolution and proactive issue detection."*

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport