Module: Datadog::OpenTracer::GlobalTracer

Defined in:
lib/datadog/opentracer/global_tracer.rb

Overview

Patch for OpenTracing module

Instance Method Summary collapse

Instance Method Details

#global_tracer=(tracer) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/datadog/opentracer/global_tracer.rb', line 7

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