Python installation instructions

Use the installation instructions below if you're installing Helios in a standard Python service.

Installing Helios in your Python microservice

Navigate to your project's root directory, and install the latest Helios OpenTelemetry SDK:

pip install helios-opentelemetry-sdk

Configuring Helios through environment variables

Define the following environment variables when running your service:

export AUTOWRAPT_BOOTSTRAP=helios # TODO: Variable should be set before process starts.
export HS_TOKEN=<API_TOKEN> # TODO: Replace value with API token from Helios.
export HS_SERVICE_NAME=<SERVICE_NAME> # TODO: Replace value with service name.
export HS_ENVIRONMENT="<ENVIRONMENT_NAME>" # TODO: Replace value with service environment.

Configuring Helios in the code

Alternatively, it is possible to configure Helios in the code itself.
In your project's **init**.py file, paste the following code snippet before all other imports:

from helios import initialize

    api_token=<API_TOKEN>,        # TODO: Insert API token from Helios.
    service_name=<SERVICE_NAME>,  # TODO: Insert service name.
    enabled=True,                 # Defaults to False if omitted.
    environment=<ENVIRONMENT>,    # Defaults to os.environ.get('DEPLOYMENT_ENV') if omitted.
    commit_hash=<COMMIT_HASH>,    # Defaults to os.environ.get('COMMIT_HASH') if omitted.

Deploying Helios in a Kubernetes cluster

It's possible to install and update the Helios OpenTelemetry SDK in a centralized manner when running multiple containers, via deployment with Kubernetes operator. Don't hesitate to reach out if you're interested in using this path.

See more configuration options here.


All set

After setup is complete and once the service is up and running, it will show up in the Helios application.

Troubleshooting tips

Installing the Helios OpenTelemetry SDK is usually a simple process; nonetheless, we've aggregated here some useful tips based on common issues we've encountered in the field so that you can complete the installation quickly.

Turn debug mode on

The Helios SDK support a debug mode through the environment variable HS_DEBUG.
Once debug mode is enabled, search for the Helios initialization prints. This will help verify (or refute) the successful installation of Helios in your microservice.