send

abstract suspend fun send(spans: Set<SpanRecord>, links: List<SpanLink> = emptyList())

Push a batch of spans to the edge, with their inferred causal links.

links carries the SpanLinks the bridge inferred for the spans in this batch (happens-before edges derived from causal stamps); the edge attaches each to its owning span's OTLP Span.links. Defaults to empty so a link-unaware caller — or a span with no links — is unaffected.

The edge must apply spans idempotently (OTLP collectors already guarantee this: duplicate spans are deduplicated by span-id). WarpOtlpBridge only sends spans that digest says the edge does not have, but idempotency at the edge is the structural backstop that makes a resend under a retry truly harmless.

spans is non-empty when called by the bridge (an empty delta is never sent).

Throws on send failure; WarpOtlpBridge wraps the call with runCatchingCancellable and surfaces the error as DrainResult.Failure.