Metric name
The metric configuration
The help text.
The metric name.
The metric type.
Gets all value entries with labels.
A map of label keys to value entries
Gets all values.
A map of label keys to values
Gets the current value for a label set.
Optionallabels: Readonly<Record<string, string>>
Label values keyed by label name
The current value
Increments the counter.
The value to add (default 1)
Optionallabels: Readonly<Record<string, string>>
Label values keyed by label name
ProtectedlabelCreates a deterministic key from labels for storage/retrieval. A pure lookup: it reads the key cache but never adds to it, so a getter cannot grow the cache — only MetricBase.seriesKey, for an observed series, does.
The labels to key by
A deterministic string key
Records an observation — equivalent to inc() for counters.
The value to add (default 1)
Optionallabels: Readonly<Record<string, string>>
Label values keyed by label name
ProtectedseriesValidates an observation's label snapshot and returns its series key, in
one pass when it can. A snapshot (from snapshotLabels) holds
only own, enumerable data properties; when it has exactly as many as the
configured names, and every configured name is among them, it carries
exactly the configured labels — which is what validateLabels checks —
provided the configured names are distinct (with ['a', 'a'], the set
{ a, b } would pass the count and presence test). Anything else takes
validateLabels, so an invalid set throws the same error as before.
The observation's own copy of its labels
The series key
ProtectedsnapshotCopies the caller's labels once per observation. Validation, the series key and the stored labels all read this copy, so an accessor returning a different value on each read cannot file a series under one label set and export it under another.
The caller's labels
A private copy, or undefined when unlabeled (null included)
Protectedvalidate
Creates a new counter.