GetServiceGraph
Source:
src/AWS/XRay/GetServiceGraph.ts
Retrieve the service graph for a time window — a document describing the services processing requests and the downstream services they call.
Bind the operation in the function’s init phase to get a runtime callable;
provide the implementation with Effect.provide(XRay.GetServiceGraphHttp).
The action is account-scoped: X-Ray does not support resource-level
permissions for xray:GetServiceGraph, so the binding grants it on *.
Service Graphs & Statistics
Section titled “Service Graphs & Statistics”import * as XRay from "alchemy/AWS/XRay";
// init — grants xray:GetServiceGraphconst getServiceGraph = yield* XRay.GetServiceGraph();
// runtimeconst now = yield* Effect.sync(() => Date.now());const graph = yield* getServiceGraph({ StartTime: new Date(now - 10 * 60 * 1000), EndTime: new Date(now),});const services = graph.Services ?? [];