OtlpHttpEdge
A Ktor OTLP/HTTP OtlpEdge. POSTs each signal to /v1/{traces,logs,metrics} and reconciles by a producer-local sent-set persisted in store — because OTLP/HTTP is write-only, there is no collector read-back.
The wire encoding is selectable via wire: OTLP/JSON (application/json, the default) or OTLP/protobuf (application/x-protobuf, the canonical, more compact OTLP wire many collectors default to). The digest/bridge reconciliation is identical for both — only the request body bytes and Content-Type differ.
The digest is what this producer has already successfully delivered to this endpoint: span and log ids in a bounded id-set, metric series as MetricKey → value hash. The set is folded forward only after a 2xx response, so a failed POST leaves the digest untouched and the next drain retries. The collector deduplicates re-sent spans/logs by id, so a lost sent-set costs bandwidth, never correctness.
The id-set is capped at maxSentIds (drop-oldest) so a long-lived producer's sent-set cannot grow without bound; choose a cap that exceeds the device's realistic offline window.
Parameters
caller-owned Ktor HttpClient — it owns the engine, timeouts, TLS, and any auth headers. kuilt does not create or close it.
collector base URL, e.g. https://collector:4318.
durable persistence for the per-endpoint sent-set.
cap on the span/log sent-set size (drop-oldest). Metrics are naturally bounded by series count.
OTLP wire encoding to emit. Defaults to OtlpWireFormat.JSON.