Skip to main content
NIGHTWATCH_TOKEN
string
required
Your environment’s API token, used to authenticate the agent. You can find this in your environment settings in the Nightwatch dashboard.
NIGHTWATCH_ENABLED
boolean
default:true
Controls whether Nightwatch is active.
NIGHTWATCH_DEPLOY
string
Optional identifier for the current deployment or release version. Useful for correlating traces and events to specific deploys.
NIGHTWATCH_SERVER
string
default:"gethostname()"
Sets the server name or instance identifier that Nightwatch uses when reporting events. Defaults to the system hostname.
NIGHTWATCH_REQUEST_SAMPLE_RATE
number
default:1
Controls the percentage of HTTP requests to sample. Value must be between 0.0 (none) and 1.0 (all).
NIGHTWATCH_COMMAND_SAMPLE_RATE
number
default:1
Controls the percentage of Artisan commands to sample. Value must be between 0.0 and 1.0.
NIGHTWATCH_EXCEPTION_SAMPLE_RATE
number
default:1
Controls the percentage of exceptions to sample. Value must be between 0.0 and 1.0. To always capture exceptions, set to 1.
NIGHTWATCH_CAPTURE_EXCEPTION_SOURCE_CODE
boolean
default:true
Controls whether Nightwatch will capture source code snippets for exception stack traces.
NIGHTWATCH_REDACT_HEADERS
string
Default: "Authorization,Cookie,Proxy-Authorization,X-XSRF-TOKEN"Comma-separated list of the request headers to be redacted. Specifying this variable will replace the defaults, so be sure to specify all headers you require.
NIGHTWATCH_INGEST_URI
string
default:"127.0.0.1:2407"
Sets the host and port that the agent should send events to. Used to route events to a local or remote collector.
NIGHTWATCH_INGEST_TIMEOUT
number
default:0.5
Timeout in seconds for the entire send operation. Applies to each batch of events.
NIGHTWATCH_INGEST_CONNECTION_TIMEOUT
number
default:0.5
Timeout in seconds for establishing a connection with the ingest server.
NIGHTWATCH_INGEST_EVENT_BUFFER
number
default:500
Maximum number of events to buffer before sending. The agent batches events to reduce overhead and improve throughput.
NIGHTWATCH_IGNORE_CACHE_EVENTS
boolean
default:false
Exclude all cache events.
NIGHTWATCH_IGNORE_MAIL
boolean
default:false
Exclude all mail events.
NIGHTWATCH_IGNORE_NOTIFICATIONS
boolean
default:false
Exclude all notification events.
NIGHTWATCH_IGNORE_OUTGOING_REQUESTS
boolean
default:false
Exclude all outgoing HTTP requests.
NIGHTWATCH_IGNORE_QUERIES
boolean
default:false
Exclude all database queries.
NIGHTWATCH_LOG_LEVEL
string
default:"env('LOG_LEVEL', 'debug')"
Controls the level of logs sent to Nightwatch. Learn more
I