Class: Datadog::Tracing::Sampling::AllSampler

Inherits:
Sampler
  • Object
show all
Defined in:
lib/datadog/tracing/sampling/all_sampler.rb

Overview

AllSampler samples all the traces.

Instance Method Summary collapse

Instance Method Details

#sample!(trace) ⇒ Object



15
16
17
# File 'lib/datadog/tracing/sampling/all_sampler.rb', line 15

def sample!(trace)
  trace.sampled = true
end

#sample?(_trace) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/datadog/tracing/sampling/all_sampler.rb', line 11

def sample?(_trace)
  true
end

#sample_rate(*_) ⇒ Object



19
20
21
# File 'lib/datadog/tracing/sampling/all_sampler.rb', line 19

def sample_rate(*_)
  1.0
end