A small project with which to demonstrate the Observer and Recon in Elixir
- clone
mix deps.get
- start a distributed node:
iex --name leo@127.0.0.1 --cookie crisp -S mix
- inspect
epmd -names
for node list - do a
curl localhost:4001/fibonacci?number=3
- open a second shell
- remote shell into node
leo
asrascal
:iex --name rascal@127.0.0.1 --cookie crisp --remsh leo@127.0.0.1
- start the Observer:
:observer.start()
, navigate to the Applications tab, and inspect the supervision tree. Note, for example, the Mail Box size. - exit then introduce the Recon call:
:recon_trace.calls({Elixir.Leo, :fibonacci, :_}, 32, [{:scope, :local}, :return_to])
. Explain the options. - do another
curl localhost:4001/fibonacci?number=3
- explain the output
- write a Cache Agent if time permits
- Plataformatec post: http://blog.plataformatec.com.br/2016/05/tracing-and-observing-your-remote-node/
- Erlang in Anger: https://www.erlang-in-anger.com/
- Elixir guide: https://elixir-lang.org/getting-started/debugging.html
- Erlang + Elixir documentation
- Project + tooling documentation