PutTelemetryRecords
Source:
src/AWS/XRay/PutTelemetryRecords.ts
Upload telemetry about segment transmission (received/sent/rejected
counts and backend connection errors) — the companion action to
PutTraceSegments used by X-Ray daemons and custom emitters.
Bind the operation in the function’s init phase to get a runtime callable;
provide the implementation with Effect.provide(XRay.PutTelemetryRecordsHttp).
The action is account-scoped: X-Ray does not support resource-level
permissions for xray:PutTelemetryRecords, so the binding grants it on *.
Writing Traces
Section titled “Writing Traces”import * as XRay from "alchemy/AWS/XRay";
// init — grants xray:PutTelemetryRecordsconst putTelemetryRecords = yield* XRay.PutTelemetryRecords();
// runtimeyield* putTelemetryRecords({ TelemetryRecords: [ { Timestamp: new Date(), SegmentsReceivedCount: 10, SegmentsSentCount: 10, }, ],});