June, 2025 release

OpenTelemetry support

OpenTelemetry is an open source framework for gathering performance traces, metrics and logs from your HCL Commerce+ system.

OpenTelemetry provides standardized APIs and SDKs for instrumenting applications. It allows your developers to monitor performance, diagnose issues and application performance, and track user behavior across distributed systems. By standardizing data collection, OpenTelemetry simplifies integration with various backends and tools. It enhances debugging, and reduces downtime by providing real-time monitoring and alerting.

OpenTelemetry is widely used for gaining insights into microservices architectures, improving system reliability, and optimizing user experiences. By unifying telemetry data collection, OpenTelemetry simplifies observability and helps teams maintain robust, scalable, and efficient applications.

OpenTelemetry and HCL Commerce+

While OpenTelemetry can be used with all versions of HCL Commerce, HCL Commerce+ includes specific configurations and extensions that simplify and enhance its functionality. A set of Java-based containers deployed with Commerce+ integrate with OpenTelemetry using the zero-code instrumentation agent, see Java Agent.

You can enable the OpenTelemetry Java agent using the following Helm chart parameters:
openTelemetry:
  javaAgentEnabled: true
  javaAgentJarVersion:
  javaAgentJarDownloadUrl: ""
  exporterOtlpEndpointEnabled: false
  nextjsOtelEnabled: true
  configMap:
    otel_config_properties: |-
      otel.exporter.otlp.endpoint=
      otel.metrics.exporter=none
      otel.logs.exporter=none
Where:
javaAgentEnabled
Values can be true or false. The default is true, meaning that the OpenTelemetry Java agent is enabled by default.
otel_config_properties
Agent configurations are included under this entry.
otel.exporter.otlp.endpoint
If an OpenTelemetry provider is enabled, set the value of this parameter to the endpoint. Also ensure that exporterOtlpEndpointEnabled is set to true. If you are not using a provider, leave this entry null.
otel.metrics.exporter=none
If set to none, this parameter enables Promethus-style metrics with pre-defined endpoints and Service Monitors.
otel.logs.exporter=none
When otel.logs.exporter=none, the log exporter is disabled in the agent configuration.
exporterOtlpEndpointEnabled
Set this value to true if you are using an OpenTelemetry provider. The default is false. In this mode, the agent disables exporters (metrics, traces and logs) and certain instrumentations. The agent only generates and propagates trace IDs, which are used for error messages and to correlate log entries across Packaged Business Capabilities (PBCs).

OpenTelemetry agent metrics exporter

Commerce+ supports Prometheus-style metrics. Prometheus stores its metrics in a registry that represents their concurrently shared state. Although Prometheus-style metrics are compatible with OpenTelemetry, in Commerce+ the Prometheus metrics registry is separate from the one used by the OpenTelemetry agent.

You can forward existing metrics to an OpenTelemetry-compatible metrics backend. To do this, configure the collector to retrieve metrics from the container endpoints via service monitors or pod annotations. You can also install a Prometheus agent to scrape the existing service monitors and forward the metrics to a remote system via the remote_write configuration.

OpenTelemetry agent log exporter

The OpenTelemetry agent enables log collection and exporting by default, using the OTLP protocol. If the OpenTelemetry collector also enables log collection (logsCollection.enabled: true), this can result in duplicate reporting.

Note: Log collection from the OpenTelemetry collector works for all pods, including those that do not have OpenTelemetry enabled. They collect their data in text format. The OpenTelemetry agent entries include more detailed, contextual information.