OtlpEdge
An OTLP-capable edge that WarpOtlpBridge drains converged CRDTs into.
The contract is intentionally minimal so the bridge stays decoupled from any specific transport: the edge exposes what it already has (digest) and accepts what it is missing (send).
Keep :kuilt-core types off this surface. The bridge consumes Seam and Loom as an implementation detail; neither leaks through here. Consumers depend on :kuilt-otel; they should not need to depend on :kuilt-core just to wire up a backend.
Implementations
A Ktor HTTP client that POSTs to
POST /v1/traces(OTLP/HTTP protobuf).A test double (us.tractat.kuilt.otel package's
RecordingEdgein tests).
Samples
// OtlpEdge is the interface you implement to point the bridge at your backend.
// The bridge calls digest() to learn what the edge already has, then send() for the delta.
//
// Example skeleton — replace with real Ktor HTTP or gRPC:
//
// class KtorOtlpEdge(private val endpoint: String) : OtlpEdge {
// override suspend fun digest(): SpanDigest {
// val ids = httpClient.get("$endpoint/v1/traces/digest").body<Set<ByteString>>()
// return SpanDigest(ids)
// }
// override suspend fun send(spans: Set<SpanRecord>, links: List<SpanLink>) {
// httpClient.post("$endpoint/v1/traces") { setBody(spans.toOtlpJson(links)) }
// }
// }Functions
Returns a compact summary of which spans this producer has already delivered to the edge (producer-local — see SpanDigest).
The value-version this producer last delivered per series (producer-local; see MetricDigest).
Push a batch of metric data points to the edge. WarpOtlpBridge only sends points whose value-hash differs from metricDigest.