Enabling observability with OpenTelemetry
Gain a deeper insight into your environment with OpenTelemetry.
About this task
OpenTelemetry is available by default on each master domain manager and Dynamic Workload Console installed with a fresh installation. You can also enable it after upgrading to the current version.
- Install and configure a tracing tool of your choice, for example Jaeger, Prometheus, or Splunk.
- Stop WebSphere Application Server Liberty, as described in Application server - starting and stopping.
- Browse to the following paths:
master domain manager
On UNIX operating systems- TWA_home/usr/servers/engineServer
On Windows operating systems- TWA_home\usr\servers\engineServer
On UNIX operating systems- DWC_home/usr/servers/dwcServer
On Windows operating systems- DWC_home\usr\servers\dwcServer
- Edit the following properties in the server.env
configuration file, based on the specifics of your
environment:
whereOTEL_EXPORTER_OTLP_ENDPOINT=http://{OPENTELEMETRY_HOSTNAME}:{OPENTELEMETRY_PORT} OTEL_EXPORTER_OTLP_TRACES_ENDPOINT={OPENTELEMETRY_HOSTNAME}:{OPENTELEMETRY_PORT} OTEL_SDK_DISABLED=false OTEL_TRACES_EXPORTER OTEL_EXPORTER_OTLP_PROTOCOL- OTEL_EXPORTER_OTLP_ENDPOINT
- A base endpoint URL for any signal type, with an optionally-specified port number
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
- Endpoint URL for trace data only, with an optionally-specified port number
- OTEL_SDK_DISABLED
- Disable the SDK for all signals
- OTEL_TRACES_EXPORTER
- Trace exporter to be used
- OTEL_EXPORTER_OTLP_PROTOCOL
- OTLP transport protocol. Supported values are as follows:
grpc- for protobuf-encoded data using gRPC wire format over HTTP/2 connection
http/protobuf- for protobuf-encoded data over HTTP connection
http/json- for JSON-encoded data over HTTP connection
For more information about the properties in the server.env file, see OpenTelemetry documentation.
- Set the following properties in the jvm.option file as
described below:
-Dotel.resource.attributes = service.name=<service_name> -Dotel.metrics.exporter = none -javaagent:<TWA_DIR>/usr/servers/engineServer/opentelemetry-javaagent.jar - Start WebSphere Application Server Liberty, as described in Application server - starting and stopping.
Results: You have now configured OpenTelemetry to work with HCL Workload Automation. The resulting telemetry data are displayed on the workstation you specified in the server.env file.
When enabling OpenTelemetry, it is important to be aware that it generates a substantial amount of data, which may impact system performance, especially on AIX operating systems.
Configuration file example
About this task
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4317
OTEL_SDK_DISABLED=false
OTEL_TRACES_EXPORTER=otlp
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc