GetSamplingRules
Source:
src/AWS/XRay/GetSamplingRules.ts
Retrieve all X-Ray sampling rules — the first half of the sampling
protocol used by custom samplers (poll rules, then report statistics
via GetSamplingTargets).
Bind the operation in the function’s init phase to get a runtime callable;
provide the implementation with Effect.provide(XRay.GetSamplingRulesHttp).
The action is account-scoped: X-Ray does not support resource-level
permissions for xray:GetSamplingRules, so the binding grants it on *.
Sampling
Section titled “Sampling”import * as XRay from "alchemy/AWS/XRay";
// init — grants xray:GetSamplingRulesconst getSamplingRules = yield* XRay.GetSamplingRules();
// runtimeconst rules = yield* getSamplingRules();const names = (rules.SamplingRuleRecords ?? []).map( (record) => record.SamplingRule?.RuleName,);