local debuginfo = debug.getinfo (1)
local fnName = debug.getinfo (1,"n").name

Tracing

https://github.com/geoffleyland/luatrace