MetricCatalog

@Serializable
class MetricCatalog(val sums: Map<MetricKey, GCounter> = emptyMap(), val doubleSums: Map<MetricKey, GCounterDouble> = emptyMap(), val gauges: Map<MetricKey, LWWRegister<Double>> = emptyMap(), val cardinalities: Map<MetricKey, HyperLogLog> = emptyMap(), val histograms: Map<MetricKey, DDSketch> = emptyMap()) : Quilted<MetricCatalog>

A converged snapshot of every metric series a device holds — counters, gauges, distinct-count estimates, and quantile sketches — bundled into one value that replicates as a whole.

This is the metric tap's replication surface: the analogue of the log buffer's Rga<LogRecord>. It is a metrics-internal composite (five maps of per-kind CRDTs); it deliberately does not bundle logs — signals replicate as separate values muxed over one transport, never a unified CRDT.

piece unions the keys of each map and joins matching values by that value's own CRDT lattice, so the composite converges by construction. No observed-remove semantics: buffer eviction is a local cap, never a replicated delete, so a plain grow-merge map is sufficient (a key evicted on the device but already pulled lingers on the puller — acceptable for a diagnostic snapshot).

Constructors

Link copied to clipboard
constructor(sums: Map<MetricKey, GCounter> = emptyMap(), doubleSums: Map<MetricKey, GCounterDouble> = emptyMap(), gauges: Map<MetricKey, LWWRegister<Double>> = emptyMap(), cardinalities: Map<MetricKey, HyperLogLog> = emptyMap(), histograms: Map<MetricKey, DDSketch> = emptyMap())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun causalDots(): Set<Dot>
Link copied to clipboard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun piece(other: MetricCatalog): MetricCatalog
Link copied to clipboard
open override fun toString(): String