• Home
  • Extend Dynatrace
  • Send data to Dynatrace with OpenTelemetry
  • OpenTelemetry traces
  • OpenTelemetry traces with OneAgent

OpenTelemetry traces with OneAgent

Opt-In

Dynatrace OneAgent code modules for Java, .NET, PHP, Node.js, and Go automatically collect OpenTelemetry span data and integrate it into end-to-end distributed traces.

The OpenTelemetry with OneAgent code module enables you to:

  • Gain insights into third-party libraries or frameworks that aren’t natively covered by OneAgent but which come with OpenTelemetry pre-instrumentation.
  • Enrich monitoring data with project-specific additions (for example, custom instrumentation that adds business data or the capture of developer-specific diagnostics points).
  • Stitch together independent, unrelated transactions to extend end-to-end traces (for instance, by adding vendor-neutral custom instrumentation to gain business-process-specific or domain-specific end-to-end transactional insights).

OpenTelemetry support in OneAgent

The quality of the OpenTelemetry spans captured by OneAgent depends on the quality of instrumentation provided by the third-party library.

Prerequisites

Monitoring frameworkVersions
OpenTelemetry1.0.x - 1.3.x, 1.4.x - 1.22.x
OpenTracing0.33, 0.32, 0.31

The OpenTelemetry Go version that OneAgent supports changes frequently because OpenTelemetry for Go is not yet stable. When an OpenTelemetry Go release candidate is available, the corresponding OneAgent support will stabilize.

Monitoring frameworkVersions
OpenTelemetry1.0 - 1.71, 1.8 - 1.11
1
Since there is the stable release of OpenTelemetry OneAgent drops support of the release candidate versions.
Monitoring frameworkVersions
OpenTelemetry1.x
Monitoring frameworkVersions
OpenTelemetry0.0.91, 0.0.101, 0.0.111, 0.0.121, 0.0.131, 0.0.141, 0.0.151
1
OpenTelemetry for PHP is in the Alpha release stage and isn't stable enough for long-term OneAgent support. Consequently, we can only support the latest version of OpenTelemetry for PHP available at the time of OneAgent release. This will change when OpenTelemetry for PHP reaches the GA release stage.
Monitoring frameworkVersions
OpenTelemetry1.0.1+
Monitoring frameworkVersions
OpenTelemetry1.0.1+

Enable OpenTelemetry integration in OneAgent code module

OneAgent automatically taps into traces exposed via OpenTelemetry custom- or pre-instrumentation and sends the telemetry data to the Dynatrace platform.

OpenTelemetry Java

To enable OpenTelemetry Java

  1. In the Dynatrace menu, go to Settings > Prefences > OneAgent features.
  2. Find and enable OpenTelemetry (Java).

Existing tracers are replaced and will no longer work after you enable OpenTelemetry Java.

OpenTelemetry Go

To enable OpenTelemetry Go

  1. In the Dynatrace menu, go to Settings > Prefences > OneAgent features.
  2. Find and enable OpenTelemetry (Go).

For OneAgent version 1.217 and earlier, the OpenTelemetry Go Sensor propagates Dynatrace context across processes only if Send W3C Trace Context HTTP headers is enabled.

  1. In the Dynatrace menu, go to Settings > Server-side service monitoring > Deep monitoring.
  2. Expand Distributed tracing.
  3. Turn on Send W3C trace context HTTP headers.

Existing tracers are not affected by OneAgent OpenTelemetry for Go support.

OpenTelemetry Node.js

To enable OpenTelemetry Node.js

  1. In the Dynatrace menu, go to Settings > Prefences > OneAgent features.
  2. Find and enable OpenTelemetry (Node.js).
OpenTelemetry PHP

To enable OpenTelemetry PHP

  1. In the Dynatrace menu, go to Settings > Prefences > OneAgent features.
  2. Find and enable OpenTelemetry (PHP).

Existing tracers are replaced and will no longer work after you enable OpenTelemetry for PHP.

OpenTelemetry .NET

To enable OpenTelemetry .NET

  1. In the Dynatrace menu, go to Settings > Prefences > OneAgent features.
  2. Find and enable OpenTelemetry (.NET).

Existing tracers are not affected by OneAgent OpenTelemetry for .NET support.

See Span settings for all configuration options.

Limitations

Java

  • OneAgent replaces both the API-only and the SDK tracer. With OpenTelemetry Java enabled, existing tracers (such as Jaeger) will no longer see spans.
  • When both OneAgent and OpenTelemetry sensors are present for the same technology, you may experience the following limitations:
    • Duplicate nodes in distributed traces
    • Additional overhead

Go

  • OneAgent can only instrument Tracer implementation of the default OpenTelemetry SDK.
  • When both OneAgent and OpenTelemetry sensors are present for the same technology, you may experience the following limitations:
    • Duplicate nodes in distributed traces
    • Additional overhead

Node.js

  • OneAgent replaces installed global OpenTelemetry SDK components TracerProvider, Propagator, and ContextManager. Therefore, with OpenTelemetry Node.js enabled, traces are no longer seen by this SDK or exported to backends like Jaeger.
  • When OneAgent and OpenTelemetry instrument the same module (such as HTTP or GRPC), you may experience the following limitations:
    • Duplicate nodes in distributed traces
    • Disconnected distributed traces
    • Additional overhead

All languages

  • OneAgent captures OpenTelemetry resource attributes only if they are provided via the OTEL_SERVICE_NAME and the OTEL_RESOURCE_ATTRIBUTES environment variables. When using the OpenTelemetry trace ingest API, this limitation doesn't apply.
  • You can't create request attributes (commonly used for trace searching and filtering) based on OpenTelemetry resource attributes.