Skip to content

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 *.

import * as XRay from "alchemy/AWS/XRay";
// init — grants xray:PutTelemetryRecords
const putTelemetryRecords = yield* XRay.PutTelemetryRecords();
// runtime
yield* putTelemetryRecords({
TelemetryRecords: [
{
Timestamp: new Date(),
SegmentsReceivedCount: 10,
SegmentsSentCount: 10,
},
],
});