The cool thing is that you can, with the BEAM, connect your shell[0] to a running server and use something like recon_trace[1] to watch functions as they’re getting called. The same principle is used for libraries like this distributed profiler so you can watch the aggregate performance of your application[2].
[0] https://hexdocs.pm/iex/1.12/IEx.html#module-remote-shells (the remsh flag)