in lib/aws-xray-sdk/sampling/local/sampling_rule.rb [29:41]
def applies?(sampling_req)
return false if sampling_req.nil? || sampling_req.empty?
host = sampling_req[:host]
url_path = sampling_req[:url_path]
http_method = sampling_req[:http_method]
host_match = !host || SearchPattern.wildcard_match?(pattern: @host, text: host)
path_match = !url_path || SearchPattern.wildcard_match?(pattern: @path, text: url_path)
method_match = !http_method || SearchPattern.wildcard_match?(pattern: @method, text: http_method)
host_match && path_match && method_match
end