view mod_measure_registration/mod_measure_registration.lua @ 4578:d95fcde6e39d

mod_measure_lua: add openmetrics-spirited way to collect lua memory use In the spirit of separate collectors found in other Prometheus packages, this is a separate module to collect metrics related to the lua stack itself.
author Jonas Schäfer <jonas@wielicki.name>
date Sat, 29 May 2021 12:12:17 +0200
parents 32d9d155a9b9
children
line wrap: on
line source

local count_registering = module:measure("user_registering", "rate");
local count_registered = module:measure("user_registered", "rate");

module:hook("user-registering", function ()
	count_registering();
end);

module:hook("user-registered", function ()
	count_registered();
end);