Class: Datadog::Sampler

Inherits:
Object
  • Object
show all
Defined in:
lib/ddtrace/sampler.rb

Overview

Sampler performs client-side trace sampling.

Direct Known Subclasses

AllSampler, RateByKeySampler, RateSampler

Instance Method Summary collapse

Instance Method Details

#sample!(_span) ⇒ Object

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/ddtrace/sampler.rb', line 13

def sample!(_span)
  raise NotImplementedError, 'Samplers must implement the #sample! method'
end

#sample?(_span) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/ddtrace/sampler.rb', line 9

def sample?(_span)
  raise NotImplementedError, 'Samplers must implement the #sample? method'
end

#sample_rate(span) ⇒ Object

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/ddtrace/sampler.rb', line 17

def sample_rate(span)
  raise NotImplementedError, 'Samplers must implement the #sample_rate method'
end