Nx.dev

Use the installation instructions below if you're installing Helios in a Nx workspace.

800800

Installing Helios in your Nx workspace

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

npm install --save @heliosphere/opentelemetry-sdk

Or, if you are using Yarn:

yarn add @heliosphere/opentelemetry-sdk

Configure Helios through environment variables

Define the following environment variables when running your service, under the .env file on your root folder or any other file stated in the Environment Variables Nx documentation:

NODE_OPTIONS="--require @heliosphere/opentelemetry-sdk"
HS_TOKEN=<API_TOKEN> # TODO: Replace value with API token from Helios.
HS_ENVIRONMENT="<ENVIRONMENT_NAME>" # TODO: Replace value with service environment.

The service name for each app is taken from the Nx configuration.

When running the apps built by Nx

Define the same environment variables on the environment your app is running on.


Did this page help you?