Spandex 2.4.0 has been released, adding support for function decorators to easily create traces and spans based on function calls.
defmodule MyThing do @decorate span() def do_something_complicated(arg1, arg2) do # ... end end
This will generate a span called
MyThing.do_something_complicated/2 that reports how long the function took to execute and reports errors that are raised.
Read next Compact Sparse Merkle Trees