Software /
code /
prosody
Changeset
12535:7ef7abb72cdd
util.openmetrics: Set __name field on metatables to improve error messages
Don't think we cause any such errors right now, but you never know!
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 30 May 2022 17:37:25 +0200 |
parents | 12534:3caff1f93520 |
children | 12536:a8cb1d7a98db |
files | util/openmetrics.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util/openmetrics.lua Mon May 30 17:34:58 2022 +0200 +++ b/util/openmetrics.lua Mon May 30 17:37:25 2022 +0200 @@ -35,6 +35,7 @@ -- `with_partial_label` by the moduleapi in order to pre-set the `host` label -- on metrics created in non-global modules. local metric_proxy_mt = {} +metric_proxy_mt.__name = "metric_proxy" metric_proxy_mt.__index = metric_proxy_mt local function new_metric_proxy(metric_family, with_labels_proxy_fun) @@ -128,6 +129,7 @@ -- BEGIN of generic MetricFamily implementation local metric_family_mt = {} +metric_family_mt.__name = "metric_family" metric_family_mt.__index = metric_family_mt local function histogram_metric_ctor(orig_ctor, buckets) @@ -278,6 +280,7 @@ end local metric_registry_mt = {} +metric_registry_mt.__name = "metric_registry" metric_registry_mt.__index = metric_registry_mt local function new_metric_registry(backend)