DefaultMetricsRegistry
このコンテンツはまだ日本語訳がありません。
Defined in: src/metrics/Metrics.ts:250
Default in-memory implementation. Thread-safe by virtue of being single-threaded (Bun + Node both run JS on a single thread per Worker; metrics live on the main thread of an ActorSystem).
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DefaultMetricsRegistry(
options?):DefaultMetricsRegistry
Defined in: src/metrics/Metrics.ts:255
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”DefaultMetricsRegistry
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
void
Defined in: src/metrics/Metrics.ts:319
Wipe the registry — primarily for tests.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”collect()
Section titled “collect()”collect(): readonly
MetricSample[]
Defined in: src/metrics/Metrics.ts:282
Snapshot every series as a flat list of MetricSamples.
Returns
Section titled “Returns”readonly MetricSample[]
Implementation of
Section titled “Implementation of”counter()
Section titled “counter()”counter(
name,labels?,options?):Counter
Defined in: src/metrics/Metrics.ts:266
Get-or-create a counter family. Same (name, help) returns the
same family across calls; labels selects (or creates) a child
series within it.
Parameters
Section titled “Parameters”string
labels?
Section titled “labels?”Labels = {}
options?
Section titled “options?”CounterOptions = {}
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”gauge()
Section titled “gauge()”gauge(
name,labels?,options?):Gauge
Defined in: src/metrics/Metrics.ts:271
Parameters
Section titled “Parameters”string
labels?
Section titled “labels?”Labels = {}
options?
Section titled “options?”GaugeOptions = {}
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”histogram()
Section titled “histogram()”histogram(
name,labels?,options?):Histogram
Defined in: src/metrics/Metrics.ts:276
Parameters
Section titled “Parameters”string
labels?
Section titled “labels?”Labels = {}
options?
Section titled “options?”HistogramOptions = {}
