interface MetricOptions
Since 0.2.0

Ergonomic options for the typed factory methods. type is injected by the method name; help defaults to the metric name.

Properties

readonly
optional
help: string

Human-readable description (Prometheus HELP). Defaults to the metric name.

readonly
optional
labels: readonly string[]

Label names attachable to observations.

readonly
optional
buckets: readonly number[]

Histogram bucket boundaries (histogram metrics only).

readonly
optional
quantiles: readonly number[]

Summary quantiles (summary metrics only).

readonly
optional
maxSamples: number

Summary only: bounded sample-window size.

Usage

import { type MetricOptions } from "metrics-plugin/src/index.ts";