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

Laravel Nightwatch is the official monitoring package for Laravel Nightwatch, a hosted application monitoring platform built specifically for Laravel. It gathers performance metrics and events inside your application and transmits them to Nightwatch, providing deep, Laravel-aware insights into how your app behaves in production.

  • Laravel-optimized metrics and insights
  • Automatic in-app instrumentation
  • Seamless transmission to the hosted platform
  • Deep performance and request visibility
  • Zero-config integration with Laravel apps
Frequently asked questions about Nightwatch
How do I install Laravel Nightwatch in a Laravel application?
Install it with composer require laravel/nightwatch and configure Nightwatch using environment variables such as NIGHTWATCH_API_KEY. The package integrates with Laravel's request, queue, command, and job lifecycle to collect telemetry. Consult the official Nightwatch documentation for the full setup flow.
How do I configure the Nightwatch API key and environment variables?
Configuration is primarily environment-driven; set NIGHTWATCH_API_KEY so the local agent can authenticate with the hosted Nightwatch platform. You can also tune sampling with variables such as NIGHTWATCH_COMMAND_SAMPLE_RATE and NIGHTWATCH_SCHEDULED_TASK_SAMPLE_RATE. Deployment detection can use NIGHTWATCH_DEPLOY when running the nightwatch:deploy command.
Which Laravel and PHP versions does laravel/nightwatch support?
The package supports Laravel 10 through 13 and PHP 8.1 through 8.5. It is actively maintained, with recent releases and minimal breaking changes noted in the changelog. Check the official documentation before upgrading major Laravel or PHP versions.
What does Laravel Nightwatch monitor by default?
Nightwatch captures Laravel-native telemetry including requests, errors, queue jobs, Artisan commands, and scheduled tasks. Newer releases also add insights for Livewire and Blade component interactions and sub-minute scheduled tasks. The result is Laravel-optimized visibility into performance, failures, and overall application health.
How does sampling work in Laravel Nightwatch and can I reduce overhead?
Sampling lets you balance metric granularity against collection overhead. Use settings such as NIGHTWATCH_COMMAND_SAMPLE_RATE and NIGHTWATCH_SCHEDULED_TASK_SAMPLE_RATE to tune command and scheduled-task coverage. High-traffic apps should tune sampling before production to avoid unnecessary overhead. Critical paths may need higher sampling than background jobs.
Does Laravel Nightwatch work with Laravel Octane and Horizon?
Yes, the package explicitly supports async workers such as Octane and Horizon in recent versions. It ignores non-critical vendor commands like octane:status by default to reduce noise and false positives. Multi-process environments may require explicit agent configuration as documented in AGENTS.md.
How do I ignore specific endpoints or commands in Nightwatch?
You can use Nightwatch::ignore() to exclude endpoints or other items you do not want tracked. The package also avoids noise from non-critical vendor commands such as octane:status. For broader control, combine ignored items with sampling settings for commands and scheduled tasks.
How do I mark deployments with Laravel Nightwatch?
Use the nightwatch:deploy Artisan command to help Nightwatch auto-detect deployments. You can set the NIGHTWATCH_DEPLOY environment variable so deployment context is captured during CI/CD. This makes it easier to correlate performance and error changes with releases.
Can Laravel Nightwatch redact sensitive data or PII?
Nightwatch supports redaction in v1.18.0 and later, but it requires explicit configuration. If your application handles PII or sensitive payloads, review what telemetry is collected and configure redaction before enabling production monitoring. Combine redaction with sampling and ignored endpoints where appropriate.
Is Laravel Nightwatch a replacement for Telescope, Sentry, or Datadog?
Nightwatch is a hosted Laravel-focused monitoring platform, so it can overlap with error tracking and APM tools, but the package itself is an agent for Nightwatch rather than a generic replacement for every tool. Teams often evaluate whether Nightwatch alerts complement or replace existing Sentry, Datadog, or Telescope workflows. Consider cost, alerting needs, and whether you still need open-source local debugging. The local agent buffers metrics before transmission, which helps with brief SaaS disruptions but does not remove the hosted-platform dependency.
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.
vento/laravel-airbrake
wfeller/laravel-batch
maco-studios/mage-os-installer
busarm/armie
siberfx/laravel-logger
kfteam1991/dcat-admin
dashed/dashed-laposta
dashed/dashed-ecommerce-montaportal
dashed/dashed-ecommerce-etsy
neohq/string-blade-compiler
log1x/acf-composer
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager