OneAgent OpenTracing support

Early Adopter Distributed tracing, also called distributed request tracing, is a method used to profile and monitor applications, especially those built using a microservices architecture.

You can integrate OpenTracing into Dynatrace. OpenTracing API provides a standard, vendor-neutral framework for the instrumentation of your applications for distributed tracing.

Dynatrace integrates the OpenTracing traces that are emitted by third-party Java libraries and frameworks, such as Hazelcast, into PurePath 4 and enriches the data with analytics, including:

  • Out-of-the-box service hotspot analysis
  • Deep-code execution details
  • Always-on profiling in transaction context

Although we've tested the seamless integration of OpenTracing data emitted by Hazelcast into PurePath, the quality of the OpenTracing spans captured by OneAgent depends on the quality of instrumentation provided by the third-party library.

Prerequisites

Enable OpenTracing integration

To make OneAgent automatically tap into traces exposed via OpenTracing instrumentation and sends the telemetry data to the Dynatrace, enable the support for capturing OpenTracing span data for Java:

  1. From the navigation menu, select Settings > Server-side service monitoring > Deep monitoring.
  2. Expand OpenTelemetry and OpenTracing.
  3. You can enable OneAgent to:
    • Automatically register Dynatrace as the GlobalTracer and thereby override other tracers that are registered in the application. Select this setting only if you're sure that you want to override the other tracers (for example, Jaeger) in your tracing system.
    • Automatically register Dynatrace as the GlobalTracer when no other tracer is registered in the application. Do this if you don't want to interfere with any other tracers in your tracing system.
  4. The GlobalTracer.get() call is a prerequisite for OneAgent to capture OpenTracing spans. When you instrument your application, make sure you add the GlobalTracer.get() call.
    See the example below of instrumentation for a custom application using OpenTracing GlobalTracer.
    Download
    public Tracer initTracer() {
      return GlobalTracer.get();
    }
    
    HazelcastInstance hazelcastInstance;
    public HazelcastInstance getTracingHazelcast() {
      if (hazelcastInstance instanceof TracingHazelcastInstance) {
        return hazelcastInstance;
      }
      hazelcastInstance = new TracingHazelcastInstance(
              HazelcastClient.newHazelcastClient(),
               false);
               return hazelcastInstance;
    }
    
    ConcurrentMap<String, String> map = getTracingHazelcast().getMap("map");
    map.put(key, value);
    
    

Span attributes configuration

Configure the span attributes collection so that you protect the data privacy and stay GDPR compliant.

Dynatrace does not capture all span attributes by default. This enables you to stay compliant with your data privacy policies and to allow you to control the amount of monitoring data.

You can explicitly configure the collection of span attributes under Settings > Server-side service monitoring > Span attributes. Specify the key of the span attribute you'd like OneAgent to capture and seamlessly integrate into PurePath.

Limitations

  • O* default service
  • When both OneAgent and OpenTracing instrumentation are present for the same technology (for example, incoming web requests via the Servlet API) you may experience the following limitations:
    • duplicated nodes in PurePath
    • additional overhead
    • for JDBC, such double instrumentation may break the service detection
    Be extra cautious when enabling OneAgent OpenTracing Java support for technologies that are supported by OneAgent out of the box.
  • Integrating traces from OpenTracing Spring Framework instrumentation is currently not supported.

Supported technologies

  • Dynatrace integrates traces from generic OpenTracing instrumentation. We have positively tested the Hazelcast OpenTracing instrumentation.