Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 4.32 KB

OpenTelemetry.md

File metadata and controls

68 lines (47 loc) · 4.32 KB

ATTENTION:

OpenTelemetry support is currently "experimental". It may be subject to breaking changes between minor versions, and is not yet recommended for use in production or other sensitive environments.

If you are interested in using this feature experimentally, please contact the dd-trace-rb maintainers; we would be happy to provide you with more information!

Supported tracing frameworks:

Type Documentation ddtrace version Gem version support
OpenTelemetry https://github.com/open-telemetry/opentelemetry-ruby 1.9.0+ >= 1.1.0

Configuring OpenTelemetry

  1. Add the ddtrace gem to your Gemfile:

    source 'https://rubygems.org'
    gem 'ddtrace'
  2. Install the gem with bundle install

  3. To your OpenTelemetry configuration file, add the following:

    require 'opentelemetry'
    require 'datadog/opentelemetry'
  4. Add a configuration block to your application:

    Datadog.configure do |c|
      # Configure the Datadog tracer here.
      # Activate integrations, change tracer settings, etc...
      # By default without additional configuration,
      # no additional integrations will be traced, only
      # what you have instrumented with OpenTelemetry.
    end

    Using this block you can:

  5. OpenTelemetry spans and Datadog APM spans will now be combined into a single trace your application.

    Integration instrumentations and OpenTelemetry Automatic instrumentations are also supported.

Limitations

There are a few limitations to OpenTelemetry Tracing when the APM integration is activated:

Feature Support? Explanation Recommendation
Context propagation Unsupported Datadog distributed header format is used instead. N/A
Span processors Unsupported N/A
Span Exporters Unsupported N/A
OpenTelemetry.logger Special OpenTelemetry.logger is set to the same object as Datadog.logger. Configure through Custom logging.
Trace/span ID generators Special ID generation is performed by ddtrace. N/A
Exporting OpenTelemetry-only traces

You can send OpenTelemetry traces directly to the Datadog agent (without ddtrace) by using OTLP. Check out our documentation on OTLP ingest in the Datadog Agent for details.

Datadog APM spans will not be sent through the OTLP exporter.