Enable OpenTelemetry in the Java Agent

The Java Agent supports two modes to send the OpenTelemetry signals:
Perform the following steps to add the required system properties in the JVM system properties:
  1. Enable OpenTelemetry:
    1. In Hybrid mode:
      • For Java Agent 22.3.0 to 25.4.0, set -Dappdynamics.opentelemetry.enabled=true.
      • For Java Agent 25.6.0 or higher, set -Dagent.deployment.mode=hybrid.
    2. In Dual Signal mode, set -Dappdynamics.opentelemetry.enabled=true or -Dagent.deployment.mode=dual.
  2. Set the traces exporter to OTLP (the OpenTelemetry-enabled Java Agent will send OpenTelemetry spans in the OTLP format):
    -Dotel.traces.exporter=otlp
  3. Set the tier name (in service.name) and application name (in service.namespace) for the JVM:
    Note: (For Hybrid mode) If you do not set the tier name in service.name, the value defaults to the tier name originally registered by the Java Agent (when the tier was first instrumented by Splunk AppDynamics).).
    -Dotel.resource.attributes="service.name=myServiceName,service.namespace=myServiceNameSpace"

    (For Hybrid mode) You also have the option to set tier and application names in your OpenTelemetry otel-config.yml file or in the OTEL_RESOURCE_ATTRIBUTES environment variable. See Configure Resource Attributes.