⚙️ 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

Parameter

Environment variable

Description

Type

apiToken

HS_TOKEN

The Helios account token (generated by Helios automatically).

String

serviceName

HS_SERVICE_NAME

Service name may contain letters, digits, hyphens and underscores only and cannot be empty. It may range between 3 to 64 characters.

String

Optional parameters

Parameter

Environment variable

Description

Type

Default value

commitHash

COMMIT_HASH or HS_COMMIT_HASH

The 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.

String

process.env.COMMIT_HASH

debug

HS_DEBUG

Enable debug prints for troubleshooting.

Boolean

False

enable

When set to true the instrumentation is enabled.

Boolean

False

environment

HS_ENVIRONMENT

The environment where the service currently runs. When running in CI, the CI provider is used (GitHub Actions, GitLab Pipeline, CircleCI, Jenkins or Travis CI).

String

process.env.NODE_ENV

maxQueueSize

HS_MAX_QUEUE_SIZE

The maximal number of queued spans, waiting to be exported to the Helios OpenTelemetry collector. In case of high throughput, additional spans will be dropped.

Number

2048

samplingRatio

HS_SAMPLING_RATIO

How many of the traces starting in this service should be sampled. Value should be any number between 0.0 and 1.0.

Number or String

1.0, i.e. all traces are sampled.

ignoredOutgoingUrls

HS_IGNORED_OUTGOING_URLS

Exclude 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.

ignoredIncomingPaths

HS_IGNORED_INCOMING_PATHS

Exclude 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_DISABLED

When set to 'true', the instrumentation will be disabled. Can be used for specific environments.

String

False

collectorEndpoint

HS_COLLECTOR_ENDPOINT

An alternative endpoint that collects the exported spans.

String

The official Helios collector endpoint.

testCollectorEndpoint

HS_TEST_COLLECTOR_ENDPOINT

An alternative endpoint that collects the exported test spans.

String

The official Helios test collector endpoint.

resourceTags

HS_RESOURCE_TAGS

Add custom tags to the exported spans.

Dictionary

hmacKey under dataObfuscation

HS_DATA_OBFUSCATION_HMAC_KEY

The private hash value used by the obfuscation function.

String

allowlist under dataObfuscation

HS_DATA_OBFUSCATION_ALLOWLIST

A list of rules defining keys that should not be obfuscated.

List

blocklist under dataObfuscation

HS_DATA_OBFUSCATION_BLOCKLIST

A list of rules defining keys that should be obfuscated.

List

HS_MAX_PAYLOAD_SIZE

The maximal payload size collected by the Helios SDK (bytes)

number

65536

scheduledDelayMillis

HS_SCHEDULED_DELAY_MILLIS

The delay interval in milliseconds between two consecutive exports.

number

5000

exportTimeoutMillis

HS_EXPORT_TIMEOUT_MILLIS

How long the export can run before it is cancelled.

number

30000


Did this page help you?