Event types
Nightwatch automatically captures these core event types, each with comprehensive contextual data:- Requests: HTTP requests handled by your application
- Queries: Database queries and transactions
- Outgoing Requests: HTTP calls to external APIs
- Jobs: Queued jobs and their execution
- Scheduled Tasks: Scheduled command executions
- Commands: Artisan commands run via CLI
- Cache: Interactions with your application cache
- Mail: Mail sent from your application
- Notifications: Notifications sent from your application
- Exceptions: Errors and exceptions thrown
- Logs: Application log entries
Execution contexts
Events connect together through an execution context — the origin point that triggered a chain of related activities. When a request enters your application, it becomes the execution context. All subsequent events (queries, cache operations, jobs, API calls, exceptions) are linked as children, creating a complete timeline of what happened. In Laravel applications, there are three types of execution contexts:- HTTP Requests: A user visits a page or an API endpoint is called
- Artisan Commands: A command is run from the CLI
- Scheduled Tasks: A scheduled job executes via Laravel’s scheduler