You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 This comment was generated by Claude on behalf of @keddie.
Epic: complete the mergeable OTel metric primitive set
We can already answer "how many" (Sum) and "how many distinct" (cardinality) in a mergeable, replicate-anywhere-then-combine form. We can't yet answer "what's the current value" or "what's the p99." This epic closes the gap so kuilt covers every OTel metric point type worth supporting — each as a CRDT (join-semilattice merge, idempotent), so metrics from many peers merge losslessly without a central aggregator.
Correction to an earlier draft of this issue: the mergeable structures already live in :kuilt-crdt — HyperLogLog, CountMinSketch, BloomFilter, GCounter, LWWRegister are all Quilted types there; #797 is the OTel exporter consuming HLL, not the home of the sketch. So the pattern is set:
CRDT structures → :kuilt-crdt, each a Quilted<T> rung with the four-law tests (precedent: HLL/CMS). Gauge reuses the existing LWWRegister; Histogram is a bucket → GCounter product; DDSketch is a new Quilted sketch alongside HLL/CMS.
The one real design fork is inside #1204 (merge model: unbounded-additive vs. op-based) — see that issue; it doesn't affect Gauge/Histogram.
Cross-cutting notes (not sub-issues)
CRDT merge is naturally cumulative. OTel aggregation temporality (delta vs. cumulative) falls out as: cumulative = the merged state; delta = a subtraction against the last-sent state. Only build the delta path if a consumer demands delta temporality — flag, don't pre-build.
Config constants are cluster-wide. Each type has a "must-match-to-merge" constant — HLL precision p, histogram boundaries, DDSketch α. Same discipline across all: fixed config, not per-call, mismatch ⇒ reject-or-recoarsen, never silently merge misaligned state.
Small, self-contained, mostly reuses existing zoo primitives (only DDSketch is new machinery), and it rounds out the metrics story for the exporter (#797). Worth knocking out sooner rather than later.
Related: #797 (Sum + HLL cardinality in the metric exporter).
Epic: complete the mergeable OTel metric primitive set
We can already answer "how many" (
Sum) and "how many distinct" (cardinality) in a mergeable, replicate-anywhere-then-combine form. We can't yet answer "what's the current value" or "what's the p99." This epic closes the gap so kuilt covers every OTel metric point type worth supporting — each as a CRDT (join-semilattice merge, idempotent), so metrics from many peers merge losslessly without a central aggregator.Coverage map
Sum(monotonic / up-down)GCounter/PNCounterGauge(last value)LWWRegisterready)Histogram(explicit buckets)fixed buckets → GCounterready)ExponentialHistogram/ quantilesbucket → GCounter)needs-design)Summary(legacy quantile)ExponentialHistogram; building it would add a legacy typeSub-issues
LWWRegister(cheapest; near-free — the register already exists)fixed buckets → GCounterPlacement — largely settled, one seam to hold
Correction to an earlier draft of this issue: the mergeable structures already live in
:kuilt-crdt—HyperLogLog,CountMinSketch,BloomFilter,GCounter,LWWRegisterare allQuiltedtypes there; #797 is the OTel exporter consuming HLL, not the home of the sketch. So the pattern is set::kuilt-crdt, each aQuilted<T>rung with the four-law tests (precedent: HLL/CMS). Gauge reuses the existingLWWRegister; Histogram is abucket → GCounterproduct; DDSketch is a newQuiltedsketch alongside HLL/CMS.:kuilt-crdtstays OTel-agnostic and dependency-light. Don't leakmetrics.protoshapes into the zoo.The one real design fork is inside #1204 (merge model: unbounded-additive vs. op-based) — see that issue; it doesn't affect Gauge/Histogram.
Cross-cutting notes (not sub-issues)
p, histogram boundaries, DDSketch α. Same discipline across all: fixed config, not per-call, mismatch ⇒ reject-or-recoarsen, never silently merge misaligned state.NumberDataPoint; Histogram →HistogramDataPoint; DDSketch →ExponentialHistogramDataPoint(a near-1:1 structural mapping — see Metrics: ExponentialHistogram / quantiles via DDSketch #1204).Why now
Small, self-contained, mostly reuses existing zoo primitives (only DDSketch is new machinery), and it rounds out the metrics story for the exporter (#797). Worth knocking out sooner rather than later.
Related: #797 (Sum + HLL cardinality in the metric exporter).