Exemplar Reservoir used by the Explicit Histogram Aggregation. The same bucket boundaries as the aggregation. Simple algorithm for adding each new measurement as an exemplar:
bucket = find_histogram_bucket(measurement) if bucket < num_buckets then reservoir[bucket] = measurement end def find_histogram_bucket(measurement): for boundary, idx in bucket_boundaries do if value <= boundary then return idx end end return boundaries.length
config() = #{explicit_bucket_boundaries => [float()]}
collect/3 | Return all exemplars for a Key and then delete them. |
new/1 | |
offer/6 |
collect(ExemplarsTab::ets:table(), Key::term(), State::#state{bucket_boundaries = [float()]}) -> [otel_metric_exemplar:exemplar()]
Return all exemplars for a Key
and then delete them.
new(X1::config()) -> #state{bucket_boundaries = [float()]}
offer(Ctx, ExemplarsTab, Key, Value, FilteredAttributes, State) -> any()
Generated by EDoc