util/statsd.lua
changeset 10928 0c072dd69603
parent 7991 dc758422d896
child 11527 5f15ab7c6ae5
--- 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;