Node.js package configuration options
The following list includes all configuration options with the name of the environment variable and the name of the key in the configuration file.
For more information on how to configure AppSignal with a configuration file or system environment variables, see our Configuration topic.
Available options
- Required options
- Options
active
Config file key |
active
|
---|---|
System environment key |
APPSIGNAL_ACTIVE
|
Required | yes |
Type | Boolean (true / false ) |
Default value | false / detected by system
|
Description
Configure AppSignal to be active or not for a given environment. Most commonly used in the file configuration per environment.
Note: When the APPSIGNAL_PUSH_API_KEY
environment variable is set, this defaults to true
. This can be overridden by setting the APPSIGNAL_ACTIVE
system environment variable to false
: APPSIGNAL_ACTIVE=false
.
apiKey
Config file key |
apiKey
|
---|---|
System environment key |
APPSIGNAL_PUSH_API_KEY
|
Required | yes |
Type | String |
Default value | nil (This is unset by default) |
Description
The organization-level authentication key to authenticate with our Push API.
Read more about the AppSignal Push API key.
Note: When the APPSIGNAL_PUSH_API_KEY
system environment variable is set, the active
option will default to true
instead of false
. This means AppSignal will be consider active for the loaded environment even if active
is set to false
in the config file. For more information see the active
option.
environment
Config file key |
environment
|
---|---|
System environment key |
APPSIGNAL_APP_ENV
|
Required | yes |
Type | String |
Default value | Read from environment variable `NODE_ENV`, defaults to "development". |
Description
The environment of the app to be reported to AppSignal.
name
Config file key |
name
|
---|---|
System environment key |
APPSIGNAL_APP_NAME
|
Required | yes |
Type | String |
Default value | nil |
Description
Name of your application as it should be displayed on AppSignal.com.
Note: Changing the name or environment of an existing app will create a new app on AppSignal.com.
caFilePath
Config file key |
caFilePath
|
---|---|
System environment key |
APPSIGNAL_CA_FILE_PATH
|
Required | no |
Type | String |
Default value | Packaged cacert.pem file path.
|
Description
Use this option to point to another certificate file if there's a problem connecting to our API.
Note: The specified path cannot contain Operating Specific file system abstractions, such as the homedir symbol ~
for *NIX systems. This will be seen as a malformed path.
debug
Config file key |
debug
|
---|---|
System environment key |
APPSIGNAL_DEBUG
|
Required | no |
Type | Boolean (true / false ) |
Default value | false |
Description
Enable debug logging, this is usually only needed on request from support. With this option enabled AppSignal will log a lot more information about decisions that are made during metrics collection and when data is sent to AppSignal.com servers.
Enabling debug logging could have a slight impact on the disk usage and IO, especially on high-traffic sites. CPU overhead is minimal with the debug option enabled.
dnsServers
Config file key |
dnsServers
|
---|---|
System environment key |
APPSIGNAL_DNS_SERVERS
|
Required | no |
Type | list(String) |
Default value | [] |
Description
Configure DNS servers for the AppSignal agent to use.
1
2
# In the host environment
export APPSIGNAL_DNS_SERVERS="8.8.8.8,8.8.4.4"
If you're affected by our DNS timeouts, try setting a DNS server manually using this option that doesn't use more than 4 dots in the server name.
- Acceptable values:
8.8.8.8
,my.custom.local.server
. - Not acceptable values:
foo
,my.awesome.custom.local.dns.server
.
If the DNS server cannot be reached the agent will fall back on the host's DNS configuration and output a message in the appsignal.log
file: A problem occurred while setting DNS servers
.
enableHostMetrics
Config file key |
enableHostMetrics
|
---|---|
System environment key |
APPSIGNAL_ENABLE_HOST_METRICS
|
Required | no |
Type | Boolean (true / false ) |
Default value | true |
Description
Set this option to false
to disable host metrics collection.
filterParameters
Config file key |
filterParameters
|
---|---|
System environment key |
APPSIGNAL_FILTER_PARAMETERS
|
Required | no |
Type | list(String) |
Default value | [] |
Description
List of parameter keys that should be ignored using AppSignal filtering. Their values will be replaced with [FILTERED]
when transmitted to AppSignal.
filterSessionData
Config file key |
filterSessionData
|
---|---|
System environment key |
APPSIGNAL_FILTER_SESSION_DATA
|
Required | no |
Type | list(String) |
Default value | [] |
Description
List of session data keys that should be ignored using AppSignal filtering. Their values will be replaced with [FILTERED]
when transmitted to AppSignal.
hostname
Config file key |
hostname
|
---|---|
System environment key |
APPSIGNAL_HOSTNAME
|
Required | no |
Type | String |
Default value | detected from system |
Description
This overrides the server's hostname. Useful for when you're unable to set a custom hostname or when a nondescript id is generated for you on hosting services.
httpProxy
Config file key |
httpProxy
|
---|---|
System environment key |
APPSIGNAL_HTTP_PROXY
|
Required | no |
Type | String |
Default value | nil (This is unset by default) |
Description
If you require the agent to connect to the Internet via a proxy set the complete proxy URL in this configuration key.
ignoreActions
Config file key |
ignoreActions
|
---|---|
System environment key |
APPSIGNAL_IGNORE_ACTIONS
|
Required | no |
Type | list(String) |
Default value | [] |
Description
List of actions that will be ignored, everything that happens including exceptions will not be transmitted to AppSignal.
Read more about ignoring actions.
ignoreNamespaces
Config file key |
ignoreNamespaces
|
---|---|
System environment key |
APPSIGNAL_IGNORE_ERRORS
|
Required | no |
Type | list(String) |
Default value | [] |
Description
List of error classes that will be ignored. Any exception raised with this error class will not be transmitted to AppSignal. Read more about ignoring errors.
log
Config file key |
log
|
---|---|
System environment key |
APPSIGNAL_LOG
|
Required | no |
Type | String |
Default value | file |
Description
Select which logger to the AppSignal agent should use. Accepted values are
file
and stdout
. See also the log_path
configuration.
file
(default)- Write all AppSignal logs to the file system.
stdout
(default on Heroku)- Print AppSignal logs in the parent process' STDOUT instead of to a file. Useful with hosting solutions such as container systems and Heroku.
Note: At this time only the AppSignal integration supports this feature and the AppSignal agent, which is used by the integration, does not yet support this.
logPath
Config file key |
logPath
|
---|---|
System environment key |
APPSIGNAL_LOG_PATH
|
Required | no |
Type | String |
Default value | /tmp/appsignal.log |
Description
Override the location of the path where the appsignal.log
file can be written to.
Note: The specified path cannot contain Operating Specific file system abstractions, such as the homedir symbol ~
for *NIX systems. This will be seen as a malformed path.
workingDirectoryPath
Config file key |
workingDirectoryPath
|
---|---|
System environment key |
APPSIGNAL_WORKING_DIRECTORY_PATH
|
Required | no |
Type | String |
Default value | detected by agent |
Available since version | 1.0.0 |
Description
Override the location where AppSignal for Node.js can store temporary files. Use this option if the default location is not suitable. See our how AppSignal operates page for more information about the purpose of this working directory.
If you are running multiple applications using AppSignal on the same server, use this configuration option to select different working directories for every AppSignal instance, otherwise the two instances could conflict with one another. For more information on this scenario see our running multiple applications on one host documentation.
1
2
3
4
5
6
7
// Example: appsignal.js
const { Appsignal } = require("@appsignal/nodejs");
const appsignal = new Appsignal({
// Other config
workingDirectoryPath: "/tmp/project_1"
});
Note: The specified path cannot contain Operating Specific file system abstractions, such as the homedir symbol ~
for *NIX systems. This will be seen as a malformed path.