metrics
Methods15
function metrics.counter(name: string, help: nil | string, metainfo: metrics.metainfo | nil, label_keys: string[] | nil) -> metrics.collector.counter
function metrics.gauge(name: string, help: nil | string, metainfo: metrics.metainfo | nil, label_keys: string[] | nil) -> metrics.collector.gauge
function metrics.histogram(name: string, help: nil | string, buckets: number[] | nil, metainfo: metrics.metainfo | nil) -> metrics.collector.histogram
function metrics.summary(name: string, help: nil | string, objectives: {number, number} | nil, params: { age_buckets_count: number?, max_age_time: number? } | nil, metainfo: metrics.metainfo | nil) -> metrics.collector.summary
function metrics.clear() -> any
function metrics.collectors() -> {string, metrics.collector}
function metrics.namespace(selector: string) -> metrics.namespace
function metrics.register_callback(callback: function, metainfo: metrics.metainfo | nil) -> any
function metrics.unregister_callback(...: any) -> any
function metrics.invoke_callbacks() -> any
function metrics.set_global_labels(label_pairs: metrics.label_pairs | nil) -> any
function metrics.set_filter(include: nil | table | string, exclude: nil | table | string) -> any
function metrics.enable_default_metrics(include: nil | table | string, exclude: nil | table) -> any
function metrics.cfg(opts: { exclude: table?, include: (table|string)?, labels: metrics.label_pairs? } | nil) -> table
function metrics.collect(opts: { default_only: boolean?, invoke_callbacks: boolean? } | nil) -> metrics.observation[]
Fields5
metrics.registry : metrics.registry
metrics.INF : number
metrics.NAN : number
metrics.http_middleware : table
metrics._VERSION : string