nathanl
How to see all function invocations for a process?
In “The Soul of Erlang and Elixir”, Saša Jurić had some custom code to trace function invocations in a process and return the first 50 invocations or all invocations in 1 second, whichever comes first. But he didn’t show the code behind the function he called.
How would you do that? (My guess is that it uses recon somehow.)
Most Liked
sasajuric
nathanl
[Turning on the @sasajuric Batman spotlight]
sasajuric
Just reading it, I have no idea why I’m calling trace twice, returning an error if the second one fails. A single trace call followed by a call to trace_pattern should work.
lessless
We need an “Elixir in Anger” ![]()
would you please point into the direction of how you would do that with recon or redbug in prod?
sasajuric
Both of these tools have some form of such safe guards (though IIRC not exactly the same). A good place to learn more would be docs:
https://ferd.github.io/recon/recon_trace.html
https://hexdocs.pm/redbug/







