OpenTracing support is based on a deprecated specification. If you want to instrument your code with an open spec, use OpenTelemetry instead. Try the beta support for processing data from OpenTelemetry instrumentation in Datadog Tracing Libraries.

To set up Datadog with OpenTracing, see the Ruby Quickstart for OpenTracing for details.

Configuring Datadog tracer settings

The underlying Datadog tracer can be configured by passing options (which match Datadog::Tracer) when configuring the global tracer:

# Where `options` is a Hash of options provided to Datadog::Tracer
OpenTracing.global_tracer = Datadog::OpenTracer::Tracer.new(options)

It can also be configured by using Datadog.configure as described in the Ruby tracer settings section.

Activating and configuring integrations

By default, configuring OpenTracing with Datadog does not automatically activate any additional instrumentation provided by Datadog. You will only receive spans and traces from OpenTracing instrumentation you have in your application.

However, additional instrumentation provided by Datadog can be activated alongside OpenTracing using Datadog.configure, which can be used to enhance your tracing further. To enable this, see Ruby integration instrumentation for more details.

Supported serialization formats

TypeSupported?Additional information
OpenTracing::FORMAT_TEXT_MAPYes
OpenTracing::FORMAT_RACKYesBecause of the loss of resolution in the Rack format, note that baggage items with names containing either upper case characters or - are be converted to lower case and _ in a round-trip, respectively. Datadog recommends avoiding these characters or accommodating accordingly on the receiving end.
OpenTracing::FORMAT_BINARYNo
PREVIEWING: rtrieu/product-analytics-ui-changes