Skip to content

GetInsightEvents

Source: src/AWS/XRay/GetInsightEvents.ts

Retrieve the intermediate states (events) X-Ray recorded while re-evaluating an insight — the insight’s impact timeline.

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

import * as XRay from "alchemy/AWS/XRay";
// init — grants xray:GetInsightEvents
const getInsightEvents = yield* XRay.GetInsightEvents();
// runtime
const result = yield* getInsightEvents({ InsightId: insightId });
const timeline = result.InsightEvents ?? [];