Skip to content

createStats

createStats(options?): Stats

Defined in: src/stats.ts:102

Opossum-style in-process statistics for every pipeline (or the ones named in pipeline), built on onTelemetry: counts over a rolling window and since start, plus latency mean / max / percentiles of whole executions.

const stats = createStats({ pipeline: 'payments' });
app.get('/health/payments', () => stats.snapshot());
stats.onSnapshot((s) => log.info(s), '30s');

StatsOptions = {}

Stats