How to set the stacktrace depth (backtrace_depth) in Elixir Erlang

Thank you @rvirding, I ended up doing just that in the start callback function of my Application module.

Just like this for anyone else looking

defmodule MyApp.Application do
  require Logger
  use Application

  def start(_type, _args) do
    :erlang.system_flag(:backtrace_depth, 20)
    ...
4 Likes