OpenTelemetry

OpenTelemetry is an open source, vendor neutral standard for distributed systems that can be used to track the current state of the job. OpenTelemetry is a set of APIs, SDKs, toolings, and integrations designed to create and manage telemetry data such as traces and metrics.

Note: OpenTelemetry does not support checkpointing. If a system fails after the checkpoint activity, then traces of the activities before the Checkpoint activity are not seen after restarting the system.

For more information about OpenTelemetry, see the OpenTelemetry documentation.

Enabling or Disabling OpenTelemetry

OpenTelemetry can be enabled or disabled through the Admin UI or the BW_JAVA_OPTS environment variable.

Admin UI

You can enable or disable OpenTelemetry at an AppNode Page 2 level.

BW_JAVA_OPTS Environment Variable

When running the application to enable or disable OpenTelemetry at an AppNode level, in the BW_JAVA_OPTS environment variable, configure the following BWEngine property :

bw.engine.opentelemetry.enable=true

Note: By default, the property is false.

Dynamically Enabling and Disabling OpenTelemetry

You can enable and disable OpenTelemetry without restarting an AppNode or an application with the help of the following Admin CLI commands:

Command Description
enableopentelemetry Enable OpenTelemetry for an AppNode.
disableopentelemetry Disable OpenTelemetry for an AppNode.

The following table describes how you can enable trace, metric, or both the variants simultaneously by setting up the BWEngine properties accordingly:

Properties Trace Metric
bw.engine.opentelemetry.enable=true

bw.engine.opentelemetry.trace.enable=true or blank

bw.engine.opentelemetry.metric.enable=false or blank

Enable Disable
bw.engine.opentelemetry.enable=true

bw.engine.opentelemetry.trace.enable=false

bw.engine.opentelemetry.metric.enable=true

Disable Enable
bw.engine.opentelemetry.enable=true

bw.engine.opentelemetry.trace.enable=true or blank

bw.engine.opentelemetry.metric.enable=true

Enable Enable

Configuring OpenTelemetry with OpenTelemetry-Collector

  1. Set up the OpenTelemetry-collector service. You can further integrate OpenTelemetry with a tracing service provider that is compliant with OpenTelemetry.
  2. To configure OpenTelemetry with OpenTelemetry-collector, in the AppNode's config.ini file, set the bw.engine.opentelemetry.enable=true property to true.

Note: The OpenTelemetry via OpenTelemetry-Collector is the recommended approach.

 

To configure OpenTelemetry native properties, set the bw.opentelemetry.autoConfigured system property to true. Thereafter, if this property is set to true, you can use the environment variables listed at https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/.

 

To send data over the HTTP protocol for OpenTelemetry traces and metrics, set the bw.engine.opentelemetry.http.protocol system property to true.

 

To configure AWS_XRAY for OpenTelemetry traces and metrics, set the bw.engine.opentelemetry.enable, bw.opentelemetry.aws.xrayIdGenerator, and bw.engine.opentelemetry.metric.enable system property to true.

 

To enable logging for the OpenTelemetry traces and metrics, set the io.opentelemetry logger in the logback.xml file. On enabling this logger, all the detailed information about traces and metrics is available in the logs.

Example:

<logger name="io.opentelemetry">       

<level value="ALL"/>

</logger>