Announcing AppSignal for Elixir 2.0

Jeff Jeff Kreeftmeijer, Milica Maksimović on

In order to be the best 5-in-1 APM tool for Elixir, we’re constantly working on improving how AppSignal works and integrates with your app. With AppSignal by your side, you’ll have a clear overview of your app’s performance after an installation process that we keep fast and simple.

As a first APM for Elixir out there, we’ve always focused on doing all the heavy lifting and providing Elixir developers with a service we’d love to use ourselves. Today, we’re very happy to announce the big release of AppSignal for Elixir 2.0 🥳 .

We’re now saving you more time by making the installation process smoother, instrumenting Ecto out of the box, and giving you better insights by specifying more errors. We’ve also laid the groundwork for future distributed tracing support.

Major Overhaul 🎉

Version 2.0 operates on the brand new span-based agent API we’ve introduced in our Node.js integration. This allows you to have more flexible custom instrumentation and will enable us to add multiprocess support and distributed tracing in the near future.

You’re now getting more insights out of raised errors and fewer generic Erlang errors will get reported. i.e. You won’t be seeing generic ErlangErrors but something like FunctionNotFoundErrors.

We’ll also be able to integrate faster with other libraries you might require in the future, as we’re making use of the native instrumentation features released in Erlang and Elixir.

Out-of-the-box Ecto Support 📦

In order to provide you with as much out-of-the-box support, we’ve now automated Ecto instrumentation.

Instead of having to set up the Ecto integration manually, AppSignal for Elixir 2.0 will automatically find your repos and instrument them automatically. If you’re upgrading, you can remove the call to :telemetry.attach/4 in your application module after upgrading to 2.0.

Three Libraries 📚

To make the setup process smoother, AppSignal for Elixir 2.0 is split up into three parts. The core of the library, which comes with the agent and all code to do custom instrumentation, is called :appsignal, like before. For Plug and Phoenix, we’ve released appsignal-plug and appsignal-phoenix respectively, to make sure we’re not including any code your app doesn’t really need and limit the number of dependencies. This also resolves some compilation order issues we’ve seen in some setups.

To upgrade, replace your dependency on :appsignal, with :appsignal_phoenix for a Phoenix app, and :appsignal_plug for a Plug one. Our Ecto instrumentation is included in the main package, like before. If you’re running a pure-Elixir app and don’t need any of the framework integrations, use the :appsignal library.

1
2
3
4
5
{:appsignal_phoenix, "~> 2.0.0"} # Phoenix
# or
{:appsignal_plug, "~> 2.0.0"} # Plug
# or
{:appsignal"~> 2.0.0"} # Pure-Elixir

Updated Phoenix Integration ⚗️

Phoenix is now easier to install as well. Instead of the :template_engines we used before, :appsignal_phoenix comes with Appsignal.Phoenix.View to gain insight into template rendering. Installing it is a matter of use-ing it in your view module:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
defmodule AppsignalPhoenixExampleWeb do
  # ...

  def view do
    quote do
      use Phoenix.View,
        root: "lib/appsignal_phoenix_example_web/templates",
        namespace: AppsignalPhoenixExampleWeb

      use Appsignal.Phoenix.View

      # Import convenience functions from controllers
      import Phoenix.Controller, only: [get_flash: 1, get_flash: 2, view_module: 1]

      # Include shared imports and aliases for views
      unquote(view_helpers())
    end
  end

  # ...
end

Telemetry ⚙️

We’ve moved our instrumentation over to Elixir’s Telemetry library where we could. The Ecto instrumentation, as well as most of the Phoenix integration now function by taking in metrics directly from Telemetry.

With the release of Appsignal for Elixir 2.0, we’ll continue moving instrumentation over to Telemetry where possible. If you’re using a library that emits Telemetry data and would like to add instrumentation for it, please feel free to reach out and we’ll help you on your way.

If You Need Help - We’re There For You 🤝

We’ve spent the last couple of months testing our new integration with a subset of our Elixir customers. If you’re new, we’ve updated our installation guide for 2.0. If you’re upgrading from 1.x, please read through our upgrade guide.

The new integration has been tested by a number of customers already, and anything we ran into has been solved. But if you run into any issues, please feel free to reach out to our support engineers, and we’ll help you get set up. Also, we think 2.0 is a great upgrade, but we’ll keep supporting 1.x for those not ready to upgrade yet.

Try AppSignal: Free for OSS & Stroopwafels Delivery 🍪

If you haven’t used AppSignal before, the 2.0 release is a great moment to try us out. You’ll have it set up in moments, and can send us billions of requests and get all of the insights with all of the features in the 30 day trial (no credit card needed). When you do, feel free to reach out, we’ll send you a free box of stroopwafels as well.

PS. If you are helping the world with a great OSS project, we help you back with a free AppSignal account. Spread the word to the maintainers you value! We’ve got your back.

10 latest articles

Go back
Elixir alchemy icon

Subscribe to

Elixir Alchemy

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.

We'd like to set cookies, read why.