VariableDescriptionTypeDefault
NIGHTWATCH_TOKENRequired. Your environment’s API token, used to authenticate the agent. You can find this in your environment settings in the Nightwatch dashboard.string
NIGHTWATCH_ENABLEDControls whether Nightwatch is active.booleantrue
NIGHTWATCH_DEPLOYOptional identifier for the current deployment or release version. Useful for correlating traces and events to specific deploys.string
NIGHTWATCH_SERVERSets the server name or instance identifier that Nightwatch uses when reporting events. Defaults to the system hostname.stringgethostname()
NIGHTWATCH_REQUEST_SAMPLE_RATEControls the percentage of HTTP requests to sample. Value must be between 0.0 (none) and 1.0 (all).number1.0
NIGHTWATCH_COMMAND_SAMPLE_RATEControls the percentage of Artisan commands to sample. Value must be between 0.0 and 1.0.number1.0
NIGHTWATCH_EXCEPTION_SAMPLE_RATEControls the percentage of exceptions to sample. Value must be between 0.0 and 1.0. To always capture exceptions, set to 1.number1.0
NIGHTWATCH_CAPTURE_EXCEPTION_SOURCE_CODEControls whether Nightwatch will capture source code snippets for exception stack traces.booleantrue
NIGHTWATCH_INGEST_URISets the host and port that the agent should send events to. Used to route events to a local or remote collector.string127.0.0.1:2407
NIGHTWATCH_INGEST_TIMEOUTTimeout in seconds for the entire send operation. Applies to each batch of events.number0.5
NIGHTWATCH_INGEST_CONNECTION_TIMEOUTTimeout in seconds for establishing a connection with the ingest server.number0.5
NIGHTWATCH_INGEST_EVENT_BUFFERMaximum number of events to buffer before sending. The agent batches events to reduce overhead and improve throughput.number500
NIGHTWATCH_IGNORE_CACHE_EVENTSExclude all cache events.booleanfalse
NIGHTWATCH_IGNORE_MAILExclude all mail events.booleanfalse
NIGHTWATCH_IGNORE_NOTIFICATIONSExclude all notification events.booleanfalse
NIGHTWATCH_IGNORE_OUTGOING_REQUESTSExclude all outgoing HTTP requests.booleanfalse
NIGHTWATCH_IGNORE_QUERIESExclude all database queries.booleanfalse
NIGHTWATCH_LOG_LEVELControls the level of logs sent to Nightwatch. Learn morestringenv('LOG_LEVEL', 'debug')