☠️ Disabling Helios
Follow the instructions below to disable Helios from running in your service.
Disabling Helios SDK with environment variables
Probably the easiest and quickest option to disable the Helios SDK is using environment variables.
To disable, set HS_DISABLED
to true
. This will override any other enablement you have set (in code or by other env vars), and should make sure the Helios SDK is disabled.
Disabling Helios SDK in code
When initializing the Helios SDK in code, it is disabled by default, and needs to be enabled explicitly in order to be activated.
Therefore, you have the following options to disable initialization in code:
- Explicitly set the enablement config option to
false
. - Drop the enablement config option - should cause Helios to be implicitly disabled.
- Remove the initialization import and code-block altogether.
const { initialize } = require('helios-opentelemetry-sdk');
initialize({
enable: true, // explicitly set to false or omit the option
apiToken: <API_TOKEN>,
serviceName: <SERVICE_NAME>,
environment: <ENVIRONMENT>,
commitHash: <COMMIT_HASH>,
});
import { initialize } from '@heliosphere/opentelemetry-sdk';
initialize({
enable: true, // explicitly set to false or omit the option
apiToken: <API_TOKEN>,
serviceName: <SERVICE_NAME>,
environment: <ENVIRONMENT>,
commitHash: <COMMIT_HASH>,
});
from helios import initialize
initialize(
enabled=True, # explicitly set to False or omit the option
api_token=<API_TOKEN>,
service_name=<SERVICE_NAME>,
environment=<ENVIRONMENT>,
commit_hash=<COMMIT_HASH>,
)
require 'helios/opentelemetry/sdk'
Helios::OpenTelemetry::SDK.initialize(
enable: true, # explicitly set to false or omit the option
api_token: "<HS_TOKEN>",
service_name: "<SERVICE_NAME>",
environment: "<ENV_NAME>"
)
const { initialize } = require('@heliosphere/web-sdk');
initialize({
enable: true, // explicitly set to false or omit the option
apiToken: <HS_TOKEN>,
serviceName: <SERVICE_NAME>,
environment: <ENVIRONMENT>
});
Disabling other OpenTelemetry instrumentations
When not using the Helios dedicated SDK for instrumenting your code (like in Java, for example), the safest method to disable instrumentation is to revert the changes done initially in order to enable it.
Please see the relevant Installation instructions to see what needs to be removed.
Updated 7 months ago