A true alchemist is never done exploring. And neither are we. Sign up for our Elixir Alchemy email series and receive deep insights about Elixir, Phoenix and other developments.
After testing the new version of AppSignal for Elixir for a couple of weeks, we're happy to announce we've just released version 1.3 of our Elixir integration. The new version brings support for pure Plug applications, and a lot of other improvements.
To upgrade to the new version, simply run
mix deps.update appsignal, and you're good to go!
We've always had full support for Phoenix out of the box, but using AppSignal in Plug apps required some manual setup. In version 1.3, we've added
Appsignal.Plug, a new Plug handler which takes care of recording web transactions.
Appsignal.Phoenix.Instrumenter will continue to record instrumentation for Phoenix apps, like it did before. This means our Plug support is now the basis of our Phoenix integration.
Appsignal.Plug to your Plug app will automatically start and stop transactions. Setting up instrumentation for specific functions in your app can be done using our decorators. An example Plug application that has instrumentation for a slow function might look like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
defmodule AppsignalPlugExample do use Plug.Router use Appsignal.Instrumentation.Decorators plug :match plug :dispatch get "/" do slow() send_resp(conn, 200, "Welcome") end @decorate transaction_event() defp slow do :timer.sleep(1000) end use Appsignal.Plug end