⚙️ Python SDK configuration

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

Mandatory parameters

Parameter

Environment variable

Description

Type

Default value

api_token

HS_TOKEN

The Helios account token (generated by Helios automatically).

String

service_name

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

commit_hash

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

os.environ.get('COMMIT_HASH')

debug

HS_DEBUG

Enable debug prints for troubleshooting.

Boolean

False

enabled

When set to True the instrumentation is enabled.

Boolean

False

environment

DEPLOYMENT_ENV or 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

os.environ.get('DEPLOYMENT_ENV')

max_queue_size

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

sampling_ratio

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.

excluded_urls

HS_EXCLUDED_URLS

To exclude certain URLs from being tracked, set the environment variable with comma delimited regexes representing which URLs to exclude.

String

client/.*/info,health - i.e. will exclude requests such as https://site/client/123/info and https://site/xyz/health.

HS_DISABLED

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

String

False

collector_endpoint

HS_COLLECTOR_ENDPOINT

An alternative endpoint that collects the exported spans.

String

The official Helios collector endpoint.

resource_tags

HS_RESOURCE_TAGS

Add custom tags to the exported spans.

Dictionary

data_obfuscation_hmac_key

HS_DATA_OBFUSCATION_HMAC_KEY

The private hash value used by the obfuscation function.

String

data_obfuscation_allowlist

HS_DATA_OBFUSCATION_ALLOWLIST

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

List

data_obfuscation_blocklist

HS_DATA_OBFUSCATION_BLOCKLIST

A list of rules defining keys that should be obfuscated in blocklist mode.

List

HS_MAX_PAYLOAD_SIZE

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

number

65536

HS_DATABRICKS

Should be set to True in case you are configuring Helios on your Databricks cluster

Boolean

False


Did this page help you?