diff options
author | Kim Alvefur <zash@zash.se> | 2021-11-24 20:03:38 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-11-24 20:03:38 +0100 |
commit | 1ac4aed7cde1aec722542199e488bc537423adbf (patch) | |
tree | 7d947ced090cb7138ea3aabae40877afa1ca3e09 /core/moduleapi.lua | |
parent | 2388b800b2370b7dae55d7f1e40420ab845b3b5a (diff) | |
download | prosody-1ac4aed7cde1aec722542199e488bc537423adbf.tar.gz prosody-1ac4aed7cde1aec722542199e488bc537423adbf.zip |
mod_admin_shell: List collected metrics in module:info
Lets you know what to look for with stats:show()
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r-- | core/moduleapi.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index ab154742..40c091ad 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -531,6 +531,7 @@ function api:measure(name, stat_type, conf) -- an array of labels -- the prosody_ prefix is automatically added by statsmanager for legacy -- metrics. + self:add_item("measure", { name = name, type = stat_type, conf = conf }); return measure(stat_type, "mod_"..self.name.."/"..name, conf, fixed_label_key, fixed_label_value) end @@ -544,6 +545,7 @@ function api:metric(type_, name, unit, description, label_keys, conf) label_keys:append(orig_labels) end local mf = metric(type_, "prosody_mod_"..self.name.."/"..name, unit, description, label_keys, conf) + self:add_item("metric", { name = name, mf = mf }); if is_scoped then -- make sure to scope the returned metric family to the current host return mf:with_partial_label(self.host) |