Skip to content

ListRetrievedTraces

Source: src/AWS/XRay/ListRetrievedTraces.ts

Retrieve the traces fetched by a Transaction Search retrieval job. Returns an empty response until the job’s RetrievalStatus is COMPLETE.

Bind the operation in the function’s init phase to get a runtime callable; provide the implementation with Effect.provide(XRay.ListRetrievedTracesHttp). The action is account-scoped: X-Ray does not support resource-level permissions for xray:ListRetrievedTraces, so the binding grants it on *.

import * as XRay from "alchemy/AWS/XRay";
// init — grants xray:ListRetrievedTraces
const listRetrievedTraces = yield* XRay.ListRetrievedTraces();
// runtime
const result = yield* listRetrievedTraces({ RetrievalToken: token });
if (result.RetrievalStatus === "COMPLETE") {
const traces = result.Traces ?? [];
}