otelMetricsSink
otelMetricsSink(
meter):MetricsSink
Defined in: src/otel/index.ts:183
A MetricsSink that records vereda’s metrics (see METRICS) on an
OpenTelemetry meter: counters as counters, vereda.duration_ms as a
histogram in ms, and gauges as observable gauges reporting the latest
value per tag set. Instruments are created on first use, so new vereda
metrics are recorded without changes here.
Parameters
Section titled “Parameters”Meter
Returns
Section titled “Returns”Example
Section titled “Example”import { metrics } from "@opentelemetry/api";const client = HttpClient.create({ timeout: { attemptMs: 5_000 }, metrics: otelMetricsSink(metrics.getMeter("checkout")),});