⚙️ Node.js SDK configuration

Use the advanced options below to configure Helios Node.js SDK, as arguments to the initialize() method or as environment variables.

Mandatory parameters

ParameterEnvironment variableDescriptionType
apiTokenHS_TOKENThe Helios account token (generated by Helios automatically).String
serviceNameHS_SERVICE_NAMEService name may contain letters, digits, hyphens and underscores only and cannot be empty. It may range between 3 to 64 characters.String

Optional parameters

ParameterEnvironment variableDescriptionTypeDefault value
commitHashCOMMIT_HASH or HS_COMMIT_HASHThe commit hash (SHA1) of the current run of the service. When running in CI, the CI provider's environment variables are used. Supported in GitHub Actions, GitLab Pipeline, CircleCI and Travis CI.Stringprocess.env.COMMIT_HASH
debugHS_DEBUGEnable debug prints for troubleshooting.BooleanFalse
enable-When set to true the instrumentation is enabled.BooleanFalse
environmentHS_ENVIRONMENTThe environment where the service currently runs. When running in CI, the CI provider is used (GitHub Actions, GitLab Pipeline, CircleCI, Jenkins or Travis CI).Stringprocess.env.NODE_ENV
maxQueueSizeHS_MAX_QUEUE_SIZEThe maximal number of queued spans, waiting to be exported to the Helios OpenTelemetry collector. In case of high throughput, additional spans will be dropped.Number2048
samplingRatioHS_SAMPLING_RATIOHow many of the traces starting in this service should be sampled. Value should be any number between 0.0 and 1.0.Number or String1.0, i.e. all traces are sampled.
ignoredOutgoingUrlsHS_IGNORED_OUTGOING_URLSExclude certain outgoing request URLs from being tracked.Regexp array (when set in code) or a comma-delimited regexes String (when set in env var).[/client\/.*\/info/,/test/] (in code) or client/.*/info,test (as env var) - will exclude outgoing requests such as https://site/client/123/info and https://site/xyz/test.
ignoredIncomingPathsHS_IGNORED_INCOMING_PATHSExclude certain incoming request paths from being tracked.Regexp array (when set in code) or a comma-delimited regexes String (when set in env var).[/ping\/.*/,/health/] (in code) or ping/.*,health (as env var) - will exclude incoming requests to paths such as /ping/987 and /health.
-HS_DISABLEDWhen set to true, the instrumentation will be disabled. Can be used for specific environments.StringFalse
metadataOnlyHS_METADATA_ONLYWhen set to true, the instrumentation will only collect metadata and not collect payload data and headers data.BooleanFalse
collectorEndpointHS_COLLECTOR_ENDPOINTAn alternative endpoint that collects the exported spans.StringThe official Helios collector endpoint.
testCollectorEndpointHS_TEST_COLLECTOR_ENDPOINTAn alternative endpoint that collects the exported test spans.StringThe official Helios test collector endpoint.
resourceTagsHS_RESOURCE_TAGSAdd custom tags to the exported spans.Dictionary-
hmacKey under dataObfuscationHS_DATA_OBFUSCATION_HMAC_KEYThe private hash value used by the obfuscation function.String-
allowlist under dataObfuscationHS_DATA_OBFUSCATION_ALLOWLISTA list of rules defining keys that should not be obfuscated.List-
blocklist under dataObfuscationHS_DATA_OBFUSCATION_BLOCKLISTA list of rules defining keys that should be obfuscated.List-
httpHeadersAllowlist under dataObfuscationHS_DATA_OBFUSCATION_HTTP_HEADERS_ALLOWLISTA list of HTTP headers that should not be obfuscated.List-
httpHeadersBlocklist under dataObfuscationHS_DATA_OBFUSCATION_HTTP_HEADERS_BLOCKLISTA list of HTTP headers that should be obfuscated.List-
-HS_MAX_PAYLOAD_SIZEThe maximal payload size collected by the Helios SDK (bytes)number65536
scheduledDelayMillisHS_SCHEDULED_DELAY_MILLISThe delay interval in milliseconds between two consecutive exports.number5000
exportTimeoutMillisHS_EXPORT_TIMEOUT_MILLISHow long the export can run before it is cancelled.number30000