in aws_xray_sdk/core/sampling/rule_cache.py [0:0]
def get_matched_rule(self, sampling_req, now):
if self._is_expired(now):
return None
matched_rule = None
for rule in self.rules:
if(not matched_rule and rule.match(sampling_req)):
matched_rule = rule
if(not matched_rule and rule.is_default()):
matched_rule = rule
return matched_rule