def sample_request?(sampling_req)
      sample = sample?
      return sample if sampling_req.nil? || sampling_req.empty?
      @custom_rules ||= []
      @custom_rules.each do |c|
        return should_sample?(c) if c.applies?(sampling_req)
      end
      # use previously made decision based on default rule
      # if no path-based rule has been matched
      sample
    end
def sample_request?(sampling_req)
      sample = sample?
      return sample if sampling_req.nil? || sampling_req.empty?
      @custom_rules ||= []
      @custom_rules.each do |c|
        return should_sample?(c) if c.applies?(sampling_req)
      end
      # use previously made decision based on default rule
      # if no path-based rule has been matched
      sample
    end
Return True if the sampler decide to sample based on input
 information and sampling rules. It will first check if any
 custom rule should be applied, if not it falls back to the
 default sampling rule.
 All arugments are extracted from incoming requests by
 X-Ray middleware to perform path based sampling.