Sha256: 601c998a42305f296a19bbc33a60d1e86edfa85ff0b01fc41396d62a781b4760

Contents?: true

Size: 1.1 KB

Versions: 24

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

require_relative 'span_processor'
require_relative 'id_generator'
require_relative 'propagator'

module Datadog
  module OpenTelemetry
    module SDK
      # The Configurator is responsible for setting wiring up
      # different OpenTelemetry requirements together.
      # Some of the requirements will be changed to Datadog versions.
      module Configurator
        def initialize
          super
          @id_generator = IdGenerator
        end

        # Ensure Datadog-configure propagation styles have are applied when configured.
        #
        # DEV: Support configuring propagation through the environment variable
        # DEV: `OTEL_PROPAGATORS`, similar to `DD_TRACE_PROPAGATION*`?
        def configure_propagation
          @propagators = [Propagator.new(Tracing::Contrib::HTTP::Distributed::Propagation.new)]
          super
        end

        # Ensure Datadog-configure trace writer is configured.
        def wrapped_exporters_from_env
          [SpanProcessor.new]
        end

        ::OpenTelemetry::SDK::Configurator.prepend(self)
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ddtrace-1.23.3 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.23.2 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.23.1 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.22.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.21.1 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.21.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.20.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.19.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.18.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.17.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.16.2 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.16.1 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.16.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.15.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.14.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.13.1 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.13.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.12.1 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.12.0 lib/datadog/opentelemetry/sdk/configurator.rb
ddtrace-1.11.1 lib/datadog/opentelemetry/sdk/configurator.rb