Software / code / prosody
Comparison
util/openmetrics.lua @ 12589:39ae08180c81
compat: Remove handling of Lua 5.1 location of 'unpack' function
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 11 Jul 2022 19:07:38 +0200 |
| parent | 12535:7ef7abb72cdd |
| child | 12590:5eaf77114fdb |
comparison
equal
deleted
inserted
replaced
| 12588:b15d3cf98ba6 | 12589:39ae08180c81 |
|---|---|
| 24 local array = require "util.array"; | 24 local array = require "util.array"; |
| 25 local log = require "util.logger".init("util.openmetrics"); | 25 local log = require "util.logger".init("util.openmetrics"); |
| 26 local new_multitable = require "util.multitable".new; | 26 local new_multitable = require "util.multitable".new; |
| 27 local iter_multitable = require "util.multitable".iter; | 27 local iter_multitable = require "util.multitable".iter; |
| 28 local t_concat, t_insert = table.concat, table.insert; | 28 local t_concat, t_insert = table.concat, table.insert; |
| 29 local t_pack, t_unpack = require "util.table".pack, table.unpack or unpack; --luacheck: ignore 113/unpack | 29 local t_pack, t_unpack = require "util.table".pack, table.unpack; |
| 30 | 30 |
| 31 -- BEGIN of Utility: "metric proxy" | 31 -- BEGIN of Utility: "metric proxy" |
| 32 -- This allows to wrap a MetricFamily in a proxy which only provides the | 32 -- This allows to wrap a MetricFamily in a proxy which only provides the |
| 33 -- `with_labels` and `with_partial_label` methods. This allows to pre-set one | 33 -- `with_labels` and `with_partial_label` methods. This allows to pre-set one |
| 34 -- or more labels on a metric family. This is used in particular via | 34 -- or more labels on a metric family. This is used in particular via |