Metric name
The metric configuration
Optionalquantiles: readonly number[]
Quantiles to compute (defaults to [0.5, 0.9, 0.99])
OptionalmaxSamples: number
Maximum samples to retain (defaults to 512)
The help text.
The metric name.
The quantiles.
The metric type.
Gets all quantile data for all observed label sets.
A map of label keys to their quantiles, sum, and count
Gets the count for a label set.
Optionallabels: Readonly<Record<string, string>>
Label values keyed by label name
The count of all observations
Gets the quantile values for a label set.
Optionallabels: Readonly<Record<string, string>>
Label values keyed by label name
A map of quantiles to values
Gets the current sample window size.
Optionallabels: Readonly<Record<string, string>>
Label values keyed by label name
The number of samples in the window
Gets the sum for a label set.
Optionallabels: Readonly<Record<string, string>>
Label values keyed by label name
The sum of all observations
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.
The observed value
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 summary.