diff options
author | Kim Alvefur <zash@zash.se> | 2020-06-11 22:02:54 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-06-11 22:02:54 +0200 |
commit | 9dfc424f2e747e58f5aae40abb73e9e9e3639990 (patch) | |
tree | 98152aac1a2d3440fba6c62be5225f60a9571a8e /util | |
parent | edd798dd98d083d81369e232348a23ebc8cc7b96 (diff) | |
download | prosody-9dfc424f2e747e58f5aae40abb73e9e9e3639990.tar.gz prosody-9dfc424f2e747e58f5aae40abb73e9e9e3639990.zip |
util.statsd: Update for API change
See change d75d805c852f to util.statistics
Diffstat (limited to 'util')
-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; |