About the Dash0 OpenTelemetry Java Distribution

Overview of the Dash0 OpenTelemetry distribution for Java: the upstream Java agent repackaged with Dash0 resource attributes and configuration, shipped as a -javaagent jar or as an extension for the upstream agent.

Note: This page is auto-generated from the opentelemetry-java-distribution  repository.

The Dash0 distribution of OpenTelemetry for Java is a thin layer on top of the upstream OpenTelemetry Java agent . It instruments a JVM without code changes, the same way the upstream agent does, and adds the Dash0 resource attributes and configuration on top.

Download it from the releases page . Each release has two jars and a SHA256SUMS file for both.

Two ways to use it

The same Dash0 code ships in two shapes:

JarHow it is loaded
dash0-opentelemetry-javaagent-<version>.jar-javaagent:<jar>
dash0-opentelemetry-agentextension-<version>.jarOTEL_JAVAAGENT_EXTENSIONS, on the upstream agent

Use the agent jar unless you have a reason not to. It is the upstream agent with the Dash0 code built in, as a single file. The extension jar is for teams that want to keep running the upstream agent, and adds the same Dash0 behaviour to it. Getting started shows the command line for each.

What it adds to the upstream agent

Every span, metric and log record carries these resource attributes.

AttributeValue
telemetry.distro.namedash0-java, in place of the upstream agent's opentelemetry-java-instrumentation
telemetry.distro.versionThe version of this distribution
dash0.package.name, dash0.package.versionThe Dash0 Linux package that installed the agent, and its version. Present only when a package installed it.

It reads two Dash0 environment variables.

  • DASH0_OTEL_COLLECTOR_BASE_URL sets the OTLP endpoint, unless OTEL_EXPORTER_OTLP_ENDPOINT is set.
  • DASH0_DISABLE=true turns the SDK into a no-op, so the process records and exports nothing.

Resource detection and configuration cover both in detail.

Defaults that differ from the upstream agent

Read this before you replace the upstream agent with this distribution. Three standard defaults are changed:

  • OTEL_TRACES_SAMPLER is always_on. Upstream uses parentbased_always_on.
  • OTEL_PROPAGATORS is tracecontext,baggage,xray. Upstream uses tracecontext,baggage.
  • OTEL_SEMCONV_STABILITY_OPT_IN is database,code,rpc,messaging. Upstream leaves it unset.

The propagator list adds an X-Amzn-Trace-Id header to every outgoing request. The semantic convention opt-in renames attributes on database, code, RPC and messaging spans, so dashboards and queries written against the upstream agent's attribute names need updating. Each is only a default, so a value you set yourself wins. Configuration explains each choice and how to keep the upstream behaviour.

Everything else is upstream behaviour, unchanged. It instruments the same libraries as the upstream agent, as auto-instrumentation describes.

Configuration files

The agent reads a declarative configuration file from OTEL_CONFIG_FILE. When that variable is unset, it uses /etc/opentelemetry/java/otel-config.yaml if the file exists. The Dash0 Linux packages install a file there.

The Dash0 attributes and both Dash0 environment variables also apply under a configuration file. See declarative configuration for the details.

Kubernetes

The Dash0 operator currently instruments JVM workloads with the stock upstream agent, not with this distribution. Kubernetes injection shows how to use this distribution in a pod the operator does not instrument.

Last updated: