Orion - Dynamic Distributed Profiling, find hotspot in a snap

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.


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.


This looks really awesome. Nice work. Will definitely check this out!

Really interesting, it would be nice to have it expose a pperf endpoint, so we can use tools like Grafana Phlare to visualise profile information.

Do you mean pprof?

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"}

And in the router:


        additional_pages: [
          orion: MyApp.Web.OrionLink,

I just published 1.0.3, which fix a long standing bug that was masking it impossible to run multiple traces.

This should now be handled properly. This took a long time to fix, but it should be totally gone now (famous last words).

So please upgrade if you use Orion.

Thanks to @larshei for reporting :heart: