Making sampling decisions based on centralized sampling rules defined by X-Ray control plane APIs. It will fall back to local sampler if centralized sampling rules are not available.
Start rule poller and target poller once X-Ray daemon address and context manager is in place.
Return the matched sampling rule name if the sampler finds one and decide to sample. If no sampling rule matched, it falls back to the local sampler’s
should_traceimplementation. All optional arguments are extracted from incoming requests by X-Ray middleware to perform path based sampling.
Load specified local rules to local fallback sampler.
load_settings(self, daemon_config, context, origin=None)¶
The pollers have dependency on the context manager of the X-Ray recorder. They will respect the customer specified xray client to poll sampling rules/targets. Otherwise they falls back to use the same X-Ray daemon as the emitter.
_process_matched_rule(self, rule, now)¶