Module: XRay::Sampler

Included in:
DefaultSampler
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

Decides if a segment should be sampled merely based on internal sampling rules.

Returns:

  • (Boolean)


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

def sample?
  raise 'Not implemented'
end

#sample_request?(service_name:, url_path:, http_method:) ⇒ 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?(service_name:, url_path:, http_method:)
  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