Changelog
New updates and improvements to Laravel Nightwatch.
Laravel Octane Support
Laravel Octane is now fully supported by Nightwatch. Upgrade the Nightwatch package to v1.9.0 or greater to get started.
Advanced Sampling and Filtering
Nightwatch now supports advanced sampling and filtering options, allowing you to customize which events are captured and which are excluded.
Route Sampling
The Sample
middleware lets you apply custom sampling rates to specific routes or route groups within your application.
This is especially useful when you want to increase visibility on critical endpoints or reduce noise from high-traffic, low-value routes.
Unmatched Routes
The Sample
middleware can also be applied to unmatched routes, useful for monitoring bot traffic.
Learn more about route-based sampling.
Always Capture Exceptions
By default, Nightwatch will always capture exceptions, no matter what sampling rules are in place. This means that even if a request or job was sampled out, any exception that occurs forces the entire lifecycle to be recorded, ensuring you collect all the most important context leading up to that event.
If you want to disable this behavior and only capture exceptions when they occur on sampled routes, you can set the NIGHTWATCH_EXCEPTION_SAMPLE_RATE
environment variable to 0
.
Event Filtering
In addition to sampling, you can filter out specific event types entirely. This allows you to focus your event allocation on the events that matter most to your application.
When an event type is filtered, it is completely excluded from the collection; no data will be sent to Nightwatch, and the event will not appear in your stream, traces, or usage metrics.
For example, if you want to ignore cache events, you can set the NIGHTWATCH_IGNORE_CACHE_EVENTS
environment variable to true
.
View the full list of filterable event types.
Log-Level Filtering
By default, Nightwatch respects Laravel’s default logging behaviour, but we have added a new environment variable to allow you to customise which logs are sent to Nightwatch.
This setting ensures that only logs at the specified level or higher (e.g., warning, error, critical) are sent to Nightwatch. Lower-level logs (e.g., info, debug) will be ignored.
Introducing Nightwatch
Hyper-optimized and Laravel-native, it’s the official application monitoring platform for Laravel apps, giving you unparalleled insights into how your app performs in the real world.
- Launched with U.S. and EU data residency, with more regions coming soon
- Open-sourced our Nightwatch agent