MetricTapClient
The test/harness side of a metric tap: join a device and read its metrics out.
Given a Seam already woven onto the device's session (the harness joins the same us.tractat.kuilt.core.Loom the device hosts on), a client either takes a one-shot pull of everything recorded so far or tails the metrics live as they change. The underlying replication is a converging merge, so the reconstructed numbers match the device's, even across a reconnect.
Unlike the log tap's per-record LogTapClient.tail, metrics have no per-record identity — a counter grows, a gauge is overwritten, a sketch absorbs — so the live view here is the whole converged MetricSnapshot, re-emitted whenever it changes.
Close the client to release its replicator.
Parameters
how this client is admitted by the host. The default LogTapAdmission.Open matches an ungated host; pass LogTapAdmission.Present with the shown code when the host was installed with LogTapAdmission.Verify.
Constructors
Functions
Pull a snapshot of the device's metrics: wait for the host's state to replicate in and settle, then collapse each CRDT to its reported value.
Tail the device's metrics live: emits the whole converged MetricSnapshot each time the replicated state changes (deduped by value). The flow replays the current state on collection, then continues until the collector is cancelled.