Configure OpenTelemetry
-
Proper identification of the source of the telemetry data requires setting the following resource attributes:
service.namespaceservice.namedeployment.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=myServiceNameorOTEL_SERVICE_NAME=myServiceNameAlternatively, you can specify resource attributes
service.namespaceandservice.namein theotel-config.yamlfile 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
- 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:
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.
- Dynamic attachment of Java Agent is not supported when OpenTelemetry is enabled.
-
IBM J9 (or OpenJ9) JVMs are not supported when OpenTelemetry is enabled.