MetricUpdate
One local change to a WarpMetricExporter series, as a value — the element of a batch handed to WarpMetricExporter.record.
Each variant is one of the exporter's single-point mutators spelled as data: IncrementSum is WarpMetricExporter.incrementSum, SetGauge is WarpMetricExporter.setGauge, and so on. Applying a list of them through WarpMetricExporter.record leaves the exporter in the same state as calling those mutators one by one, in order; what differs is how many durable writes that costs.
Each variant rejects at construction the arguments its CRDT would reject when applied. What a variant cannot know until it meets an exporter — AddExponentialHistogram's scale against the exporter's WarpMetricExporter.histogramScale, and whether an IncrementSum or a histogram update would carry one of the exporter's counts past Long.MAX_VALUE — WarpMetricExporter.record checks for every update before it applies any, so none leaves a batch applied half-way. The one-by-one equivalence above holds for every batch record accepts.
Remote snapshot merges (mergeSum, mergeGauge, …) are not updates — they are joins of another replica's state, and stay single calls.
Inheritors
Types
Add element to the distinct-count sketch for key — WarpMetricExporter.addCardinality.
Add one interval's already-bucketed measurements to the histogram for key, in the shape of an OTLP ExponentialHistogramDataPoint — what an OpenTelemetry SDK exports for an exponential histogram under delta temporality.
Add by to the integer sum for key — WarpMetricExporter.incrementSum.
Add by to the exact-precision sum for key — WarpMetricExporter.incrementSumDouble.
Record one measurement into the histogram for key — WarpMetricExporter.recordHistogram.
Set the gauge for key to value at timestamp — WarpMetricExporter.setGauge.