diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-09-30 09:50:33 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-09-30 09:50:33 +0100 |
commit | 785c20f6ee7e61a5a91a8b6259623bc2a2bbffaa (patch) | |
tree | 3a37db7b805b1555d08cc61c7938cf512ff35ce0 /util/statsd.lua | |
parent | e55d037cdf89efac99c6144b381c9fa880f7fb93 (diff) | |
parent | b80ff2ae4f86aa26e055890a8284b55170ef2056 (diff) | |
download | prosody-785c20f6ee7e61a5a91a8b6259623bc2a2bbffaa.tar.gz prosody-785c20f6ee7e61a5a91a8b6259623bc2a2bbffaa.zip |
Merge 0.11->trunk
Diffstat (limited to 'util/statsd.lua')
-rw-r--r-- | util/statsd.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/statsd.lua b/util/statsd.lua index 67481c36..8f6151c6 100644 --- a/util/statsd.lua +++ b/util/statsd.lua @@ -38,13 +38,13 @@ local function new(config) local methods; methods = { - amount = function (name, initial) - if initial then - send_gauge(name, initial); + amount = function (name, conf) + if conf and conf.initial then + send_gauge(name, conf.initial); end return function (new_v) send_gauge(name, new_v); end end; - counter = function (name, initial) --luacheck: ignore 212/initial + counter = function (name, conf) --luacheck: ignore 212/conf return function (delta) send_gauge(name, delta, true); end; @@ -54,7 +54,7 @@ local function new(config) send_counter(name, 1); end; end; - distribution = function (name, unit, type) --luacheck: ignore 212/unit 212/type + distribution = function (name, conf) --luacheck: ignore 212/conf return function (value) send_histogram_sample(name, value); end; |