aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-05-30 17:34:58 +0200
committerKim Alvefur <zash@zash.se>2022-05-30 17:34:58 +0200
commitb78c9e7f5f1ad2e696a76e01e8af70c0eda84246 (patch)
tree392672363eb0b7e067bedf97f70fce7991ab3375 /util
parentafe8199ba90062bb215e3f154549e7e793db955a (diff)
downloadprosody-b78c9e7f5f1ad2e696a76e01e8af70c0eda84246.tar.gz
prosody-b78c9e7f5f1ad2e696a76e01e8af70c0eda84246.zip
util.openmetrics: Set (previously unused, empty) metatable
Silences luacheck warning about the metatable being unused.
Diffstat (limited to 'util')
-rw-r--r--util/openmetrics.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/openmetrics.lua b/util/openmetrics.lua
index cb7791ec..c18e63e9 100644
--- a/util/openmetrics.lua
+++ b/util/openmetrics.lua
@@ -38,7 +38,7 @@ local metric_proxy_mt = {}
metric_proxy_mt.__index = metric_proxy_mt
local function new_metric_proxy(metric_family, with_labels_proxy_fun)
- return {
+ return setmetatable({
_family = metric_family,
with_labels = function(self, ...)
return with_labels_proxy_fun(self._family, ...)
@@ -48,7 +48,7 @@ local function new_metric_proxy(metric_family, with_labels_proxy_fun)
return family:with_labels(label, ...)
end)
end
- }
+ }, metric_proxy_mt);
end
-- END of Utility: "metric proxy"