Configure OpenTelemetry

  • Proper identification of the source of the telemetry data requires setting the following resource attributes:
    • service.namespace
    • service.name
    • deployment.environment.name (optional, but highly recommended)

    for example: -Dotel.resource.attributes="service.name=myServiceName,service.namespace=myServiceNameSpace,deployment.environment.name=myDepartment"

    You can also set the resource attributes in the OTEL_RESOURCE_ATTRIBUTES environment variable, or set service name or namespace individually, for example: -Dotel.service.name=myServiceName or OTEL_SERVICE_NAME=myServiceName

    Alternatively, you can specify resource attributes service.namespace and service.name in the otel-config.yaml file used by the collector (see below).

  • In most cases, you must set up and run an OpenTelemetry collector on the same system which runs the Java Agent. See Understand and Use the Collector.

  • If you cannot use the collector, you can send the OTel metrics and traces directly to O11y Cloud. See the section Send data directly to Splunk Observability Cloud in Instrumenting a Java application.

  • Be aware that the OTel component of the Combined Java Agent can be configured using any additional settings which are applicable to the Splunk OTel Java Agent, as described in Configure the Java Agent.

Automatic configuration

  • In Hybrid mode, if you do not set service.name, the value defaults to the tier name as used by the Java Agent.
    • In Dual Signal or OTel-only mode, for Agent version 25.10 or later, if you do not set some of the resource attributes, they will be automatically set based on the following AppDynamics configuration:
      AppDynamics Configuration Element OTel Configuration Element
      Tier name Service name
      Application name Service Namespace
      Account name Deployment Environment Name

Example: If you set up and run the local collector, all you need to do to configure Dual Signal mode is to set the environment variable AGENT_DEPLOYMENT_MODE to dual. The default values for other configuration settings will automatically export logs, metrics and traces to the collector. The required resource attributes will be automatically populated by the Combined Java Agent.

Note:
  • Dynamic attachment of Java Agent is not supported when OpenTelemetry is enabled.
  • IBM J9 (or OpenJ9) JVMs are not supported when OpenTelemetry is enabled.