Configuration

You can configure the behavior of our agents using these configuration options. They can be set from environment variables like:

env.sh
export ATLAS_APIKEY="<API_KEY>"
app.js
require('dotenv').config(); 

const heimdall = require('@ctrlb/heimdall');

heimdall.start({ });

or inside the code as:

heimdall.start({
    apiKey:"<API_KEY>"
})

In the table below, you can see what each config option does and how to set them.

Except for the parameter apiKey, all other configuration options are optional and have default values.

Config name in codeConfig name as env variablePurpose

apiKey

ATLAS_APIKEY

This is the api key used to authenticate with CtrlB services.

applicationName

ATLAS_APPLICATION_NAME

Set the name of your application to improve your experience. Defaults to git repo if available.

applicationStage

ATLAS_APPLICATION_STAGE

Set this if the same application is deployed in prod, beta or dev environment to distinguish between them. Can leave unspecified if not applicable.

applicationVersion

ATLAS_APPLICATION_VERSION

Set this if the same application name and stage have multiple versions running. Can leave unspecified if not applicable.

logLevel

ATLAS_LOG_LEVEL

Set the log level for JS agent. Defaults to "info". Can be one of "debug", "info", "warn", "err".

autoInstrumentation

ATLAS_AUTO_INSTRUMENTATION_ENABLE

This is an experimental feature to automatically generate trace ids for distrubuted requests. Disabled by default. Set this to "true" to enable it.

maxProperties

ATLAS_MAX_PROPERTIES

This determines the maximum variables captured in a tracepoint snapshot. Default value is 100.

maxParseDepth

ATLAS_MAX_PARSE_DEPTH

This determines the maximum depth to which nested variables are captured in tracepoint snapshot. Default value is 5.

Last updated