Method: Datadog::Tracing::Component::InstanceMethods#reconfigure_live_sampler

Defined in:
lib/datadog/tracing/component.rb

#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.

[View source]

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