Module: Datadog::Tracing::Component::InstanceMethods

Included in:
Core::Configuration::Components
Defined in:
lib/datadog/tracing/component.rb

Overview

Methods that interact with component instance fields.

Instance Method Summary collapse

Instance Method Details

#reconfigure_live_samplerObject

Hot-swaps with a new sampler. This operation acquires the Components lock to ensure there is no concurrent modification of the sampler.



20
21
22
23
# File 'lib/datadog/tracing/component.rb', line 20

def reconfigure_live_sampler
  sampler = self.class.build_sampler(Datadog.configuration)
  Datadog.send(:safely_synchronize) { tracer.sampler.sampler = sampler }
end