Mercurial > prosody-modules
changeset 6444:47d88f6e8400
mod_statistics_statsman: Replace util.serialization.serialize with %q
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Wed, 11 Mar 2026 00:42:49 +0100 |
| parents | 7547c2869e78 |
| children | 54e84ec12c82 |
| files | mod_statistics_statsman/mod_statistics_statsman.lua |
| diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_statistics_statsman/mod_statistics_statsman.lua Wed Mar 11 00:34:11 2026 +0100 +++ b/mod_statistics_statsman/mod_statistics_statsman.lua Wed Mar 11 00:42:49 2026 +0100 @@ -3,7 +3,6 @@ local statsman = require "core.statsmanager"; local time_now = require "util.time".now; local filters = require "util.filters"; -local serialize = require "util.serialization".serialize; assert(statsman.get_stats, "not compatible with trunk based on openmetrics"); @@ -32,9 +31,8 @@ }; local function push_stat(conn, name, value) - local value_str = serialize(value); name = name_map[name] or name; - return conn:write((("STAT %q (%s)\n"):format(name, value_str):gsub("\\\n", "\\n"))); + return conn:write((("STAT %q (%q)\n"):format(name, value):gsub("\\\n", "\\n"))); end local function push_stat_to_all(name, value)
