Navigate to your project's root directory, and install the latest Helios OpenTelemetry SDK:
pip install helios-opentelemetry-sdk
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.
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 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. )
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.
After setup is complete and once the service is up and running, it will show up in the Helios application.
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.
The Helios SDK support a debug mode through the environment variable
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.
Updated 7 days ago