Query List
View all queries for an application from the Queries panel. Each query is displayed with its SQL statement, connection, total calls, including the average and p95 execution times.Query Details
Click on any query in the list to view its full details page, which shows the query’s performance over time. You can also see every individual execution of that query and its parent context. Clicking on an execution opens the full trace, showing the query within the context of its parent lifecycle (e.g., inside a request or job) alongside all related activities.Query Bindings
When viewing database queries in Nightwatch, you may notice question marks (?) used in place of actual values. These are called query parameter bindings, which represent the values that were bound to the query at runtime.
Nightwatch does not capture or display these bound values by design. This is a deliberate decision made to protect your application from unintentionally leaking sensitive or personally identifiable information. Security and data protection are core principles in how we designed Nightwatch.
If you need to troubleshoot a specific query and want to see the values being used, a recommended approach is to log the data manually using Laravel’s Log facade as contextual information. These logs will appear alongside the query in Nightwatch, giving you better context while still providing greater control over the data that is sent.
Example:
? represents the email address passed at runtime, which Nightwatch intentionally redacts.
Sampling
There are no direct sampling controls for queries, they are are automatically captured when their parent execution context is sampled.Filtering
There are a number of different methods to filter query events.Filtering All Queries
To completely disable the collection of all database queries, set theNIGHTWATCH_IGNORE_QUERIES environment variable to true:
Filtering Specific Queries
You can filter out specific queries using theNightwatch::rejectQueries() method. This is useful for filtering out queries related to jobs or cache which could consume a significant portion of your quota.
Filtering events can help to conserve your event quota, but may also hide
issues in your application. In the above example, if your database was
responding slowly, your queue throughput would be reduced, but you wouldn’t
have visibility as to why.
Redaction
You can manually redact sensitive information from query SQL statements using theredactQueries callback: