Software /
code /
prosody
Changeset
10924:0c072dd69603
util.statsd: Update for API change
See change d75d805c852f to util.statistics
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 11 Jun 2020 22:02:54 +0200 |
parents | 10923:dff1aebd0f2b |
children | 10925:73e95ecec733 |
files | util/statsd.lua |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/util/statsd.lua Wed Jun 10 13:15:57 2020 -0500 +++ b/util/statsd.lua Thu Jun 11 22:02:54 2020 +0200 @@ -38,13 +38,13 @@ 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 @@ 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;