MetricTapHost

The device side of a metric tap: a peer that offers its converged metric buffer for extraction.

An app that wants its metrics reachable from a test or CI process calls installMetricTap once. From then on the device hosts a small session another peer can join to pull the metrics out of — handy on a phone or simulator where metrics are otherwise hard to get at. Until installMetricTap is called, nothing is opened: the tap is entirely opt-in.

Under the surface the host rides a Quilter over the woven Seam, replicating the device's MetricCatalog (counters, gauges, cardinalities) to whoever joins. Replication is idempotent by construction, so a puller that reconnects converges without double-counting.

Close the returned host to stop offering metrics and release the replicator.

Properties

Link copied to clipboard

This peer's own id within the session — useful for diagnostics and per-device artifact naming on a multi-device harness.

Functions

Link copied to clipboard
override fun close()
Link copied to clipboard
fun sync()

Offer the buffer's current converged state for replication now, without waiting for the next MetricTapConfig.syncInterval tick.