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!
Plug support
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.
Adding 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:
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
Other changes
- We've added a request header white list to only receive the data we need. Of course, you can still use tagging to add more data to your samples.
- Previously, we put samples from Phoenix channels in the "background" namespace. We added a new namespace named "channels", which will host this data from now on.
- Besides ignoring actions and errors, you can now ignore namespaces. More information about ignoring namespaces can be found in our documentation.
Please see the changelog for more details about these improvements, and bug fixes. And as always: get in touch if you encounter problems after upgrading. We're happy to help!