ecluse:ecluse-runtime
Safe HaskellNone
LanguageGHC2021

Ecluse.Runtime.Telemetry.Batched

Description

Synchronous metric records batched per capability, so a request thread does not queue on the SDK's single storage cell. A flush gives the SDK one summed delta per counter series, the newest value per gauge series, and every histogram sample in recording order, each under the span it was recorded in, so exemplars keep their trace. Flushes run every second and before every collection, the reader's last at shutdown included, so an export sees every record made before it. Observable and Double instruments pass straight through, and the SDK stays the aggregator and exporter.

Synopsis

Documentation

batchMeterProvider :: (SomeException -> IO ()) -> MeterProvider -> IO (MeterProvider, IO ()) Source #

Wrap an SDK provider so its synchronous Int64 counters, up-down counters and gauges, and its histograms, record per capability. Also returns the flusher's step: wait a second, then flush.