Ever had to fix “This is slow” but it was super painful? I get you, it is hard. But it became far easier just now. Because now you can profile as deep as you want, as precisely as you want, live, in production, with nice UX and nearly no impact. No need to instrument anything in advance.
Just go to your Orion page after installing it and you can profile any function call in a few seconds. Across your cluster. At any point in the future. https://hexdocs.pm/orion/1.0.1/Orion.html
Want more? Feel free to talk with me, there are a lot of future features planned. This needs Elixir right now. We have plans to make it easier to use from other BEAM languages in the future, but for now, we are limiting it to this.
Anyway, this will not work. Phlare is a tool made for constant statistical profiling. It samples the whole stacktraces. This is dynamic and targeted, meant to allow you to explore through hypothesis. It is not supposed to run for a long time and it is not supposed to give you information over a whole stacktrace. This is an exploratory tool for interactive debugging. The format is not adapted and I could not even give them the information they need.
I listened to the ThinkingElixir podcast episode on this, and re. the discussion about adding it to LiveDashboard, this works to simply add a link to Orion in the dashboard nav:
defmodule MyApp.Web.OrionLink do
@moduledoc false
use Phoenix.LiveDashboard.PageBuilder
@impl true
def menu_link(_, _) do
{:ok, "Orion tracing"}
end
end