π€ This comment was generated by Claude on behalf of @keddie.
Part of #1201.
Explicit-bucket Histogram β fixed buckets β GCounter
The classic Prometheus-style histogram: the consumer predefines bucket boundaries, and each bucket counts how many observations fell in it. Mergeable form is trivial and reuses machinery we have.
Shape
Histogram β (bucket_boundary β GCounter) // fixed key set, chosen up front
+ GCounter // total count
+ GCounter-of-sum (optional) // running sum for the mean
- Buckets are a fixed, config-given set of boundaries β the key space never changes.
- Each bucket is a
GCounter so counting is idempotent under anti-entropy re-delivery (the per-source-keyed counting trick; naive count-add double-counts).
- Merge = per-bucket
GCounter merge β associative, commutative, idempotent.
- Serializes to OTLP
HistogramDataPoint (explicit bounds + bucket_counts).
Why this exists alongside DDSketch (#1201's sub-issue)
Explicit-bucket vs. DDSketch is a real choice, not redundancy:
- Explicit β you pick boundaries; great when you know the range and want fixed, cheap, predictable buckets. Bad if you guess wrong (p99 lands in one giant low-res bucket).
- DDSketch (exponential) β log buckets auto-cover whatever range appears at uniform relative resolution; better for latency spanning orders of magnitude.
Ship both; they map to two distinct OTel point types (Histogram vs. ExponentialHistogram).
Notes / design surface
- Bucket boundaries are a cluster-wide constant (like Ξ± for DDSketch and
p for HLL) β two histograms merge only if boundaries match. Fixed config, not per-call.
- Decide whether to carry
sum and min/max (OTLP allows optional min/max) β min/max are not cleanly mergeable as CRDTs unless done as separate min/max-registers; call it out.
Acceptance
Placement (zoo vs. exporter-local) is resolved once for the epic β see #1201.
Part of #1201.
Explicit-bucket Histogram β
fixed buckets β GCounterThe classic Prometheus-style histogram: the consumer predefines bucket boundaries, and each bucket counts how many observations fell in it. Mergeable form is trivial and reuses machinery we have.
Shape
GCounterso counting is idempotent under anti-entropy re-delivery (the per-source-keyed counting trick; naive count-add double-counts).GCountermerge β associative, commutative, idempotent.HistogramDataPoint(explicitbounds+bucket_counts).Why this exists alongside DDSketch (#1201's sub-issue)
Explicit-bucket vs. DDSketch is a real choice, not redundancy:
Ship both; they map to two distinct OTel point types (
Histogramvs.ExponentialHistogram).Notes / design surface
pfor HLL) β two histograms merge only if boundaries match. Fixed config, not per-call.sumandmin/max(OTLP allows optional min/max) βmin/maxare not cleanly mergeable as CRDTs unless done as separate min/max-registers; call it out.Acceptance
bucket β GCounterhistogram with fixed boundaries + total count (+ optional sum).HistogramDataPointserialization.Placement (zoo vs. exporter-local) is resolved once for the epic β see #1201.