GetTraceSegmentDestination
Source:
src/AWS/XRay/GetTraceSegmentDestination.ts
Retrieve the current destination (X-Ray or CloudWatch Logs) of data
sent to PutTraceSegments and the OTLP endpoint. Transaction Search
trace retrieval requires a CloudWatch Logs destination.
Bind the operation in the function’s init phase to get a runtime callable;
provide the implementation with Effect.provide(XRay.GetTraceSegmentDestinationHttp).
The action is account-scoped: X-Ray does not support resource-level
permissions for xray:GetTraceSegmentDestination, so the binding grants it on *.
Transaction Search
Section titled “Transaction Search”import * as XRay from "alchemy/AWS/XRay";
// init — grants xray:GetTraceSegmentDestinationconst getTraceSegmentDestination = yield* XRay.GetTraceSegmentDestination();
// runtimeconst destination = yield* getTraceSegmentDestination();const isTransactionSearch = destination.Destination === "CloudWatchLogs";