Enable OpenTelemetry in the Java Agent

To enable the Java Agent for OpenTelemetry, you need Java Agent version >= 21.11.4 (we recommend using Java Agent version >= 22.3.0). For a list of Java frameworks supported for OpenTelemetry, see Supported Java Agent Frameworks for OpenTelemetry.
Add the following system properties in your JVM system properties:
  1. Enable OpenTelemetry:
    -Dappdynamics.opentelemetry.enabled=true
  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:
    Warning: If you do not set the tier name in service.name, the value defaults to the tier name originally registered by the .NET Agent (when the tier was first instrumented by Splunk AppDynamics).
    -Dotel.resource.attributes="service.name=myServiceName,service.namespace=myServiceNameSpace"

    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 Set service.nameandservice.namespace to Your Application and Tier Names.