Module: XRay::Sampler

Included in:
DefaultSampler, LocalSampler
Defined in:
lib/aws-xray-sdk/sampling/sampler.rb

Overview

The sampler interface that calculates if a segment should be sampled or not upon creation based on the sampling rules it holds. It doesn’t respect sampling decision from upstream.

Instance Method Summary collapse

Instance Method Details

#sample?Boolean

Sample purely based on cached sampling rules without any incoming rules matching information.

Returns:

  • (Boolean)


15
16
17
# File 'lib/aws-xray-sdk/sampling/sampler.rb', line 15

def sample?
  raise 'Not implemented'
end

#sample_request?(sampling_req:) ⇒ Boolean

Decides if a segment should be sampled for an incoming request. Used in case of middleware.

Returns:

  • (Boolean)


9
10
11
# File 'lib/aws-xray-sdk/sampling/sampler.rb', line 9

def sample_request?(sampling_req:)
  raise 'Not implemented'
end

#sampling_rulesObject



23
24
25
# File 'lib/aws-xray-sdk/sampling/sampler.rb', line 23

def sampling_rules
  raise 'Not implemented'
end

#sampling_rules=(v) ⇒ Object



19
20
21
# File 'lib/aws-xray-sdk/sampling/sampler.rb', line 19

def sampling_rules=(v)
  raise 'Not implemented'
end