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

ParameterEnvironment variableDescriptionTypeDefault value
api_tokenHS_TOKENThe Helios account token (generated by Helios automatically).String-
service_nameHS_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

Enabling or disabling the instrumentation

ParameterEnvironment variableDescriptionTypeDefault value
enabled-When set to True the instrumentation is enabled.BooleanFalse
-HS_DISABLEDWhen set to True, the instrumentation will be disabled. Can be used for specific environments.StringFalse

Other parameters

ParameterEnvironment variableDescriptionTypeDefault value
commit_hashCOMMIT_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.Stringos.environ.get('COMMIT_HASH')
debugHS_DEBUGEnable debug prints for troubleshooting.BooleanFalse
metadata_onlyHS_METADATA_ONLYWhen set to True, the instrumentation will only collect metadata and not collect payload data and headers data.BooleanFalse
environmentDEPLOYMENT_ENV or HS_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).Stringos.environ.get('DEPLOYMENT_ENV')
max_queue_sizeHS_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
sampling_ratioHS_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.
excluded_urlsHS_EXCLUDED_URLSTo exclude certain URLs from being tracked, set the environment variable with comma delimited regexes representing which URLs to exclude.Stringclient/.*/info,health - i.e. will exclude requests such as https://site/client/123/info and https://site/xyz/health.
excluded_grpc_methodsHS_EXCLUDED_GRPC_METHODS To exclude certain gRPC methods from being tracked, set the environment variable with comma delimited regexes representing which methods or services to exclude.StringSimpleServer,Health - i.e. will exclude requests such as /SimpleServer/SimpleMethod and /GRPCTestServer/Health.
collector_endpointHS_COLLECTOR_ENDPOINTAn alternative endpoint that collects the exported spans.StringThe official Helios collector endpoint.
resource_tagsHS_RESOURCE_TAGSAdd custom tags to the exported spans.Dictionary-
data_obfuscation_hmac_keyHS_DATA_OBFUSCATION_HMAC_KEYThe private hash value used by the obfuscation function.String-
data_obfuscation_allowlistHS_DATA_OBFUSCATION_ALLOWLISTA list of rules defining keys that should not be obfuscated in allowlist mode.List-
data_obfuscation_blocklistHS_DATA_OBFUSCATION_BLOCKLISTA list of rules defining keys that should be obfuscated in blocklist mode.List-
data_obfuscation_http_headers_allowlistHS_DATA_OBFUSCATION_HTTP_HEADERS_ALLOWLISTA list of HTTP headers that should not be obfuscated.List-
data_obfuscation_http_headers_blocklistHS_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). Limit is 1MB.Number65536
-HS_DATABRICKSShould be set to True in case you are configuring Helios on your Databricks cluster.BooleanFalse
-OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUTTrace export timeout of Lambda instrumentation in milliseconds.Number30000
-HS_SERVICE_NAMESPACEThe standard OTel resource attribute used to associate resources with teams.String-