Sha256: 24805c308fc1857f35f39a44877c07bc4ddec09009a7637f91d1e2fb9f132dc4

Contents?: true

Size: 393 Bytes

Versions: 2

Compression:

Stored size: 393 Bytes

Contents

module Datadog
  module OpenTracer
    # Patch for OpenTracing module
    module GlobalTracer
      def global_tracer=(tracer)
        super.tap do
          if tracer.class <= Datadog::OpenTracer::Tracer
            # Update the Datadog global tracer, too.
            Datadog.configure { |c| c.tracing.instance = tracer.datadog_tracer }
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ddtrace-1.10.1 lib/datadog/opentracer/global_tracer.rb
ddtrace-1.10.0 lib/datadog/opentracer/global_tracer.rb