Elixir Package 1.12: Phoenix 1.5 Support & Better Channel Error Handling

Jeff Kreeftmeijer

Jeff Kreeftmeijer on

Elixir Package 1.12: Phoenix 1.5 Support & Better Channel Error Handling

Great news for all the Elixir alchemists, we've just released AppSignal for Elixir package version 1.12.0 which adds support for the upcoming 1.5 version of the Phoenix framework, and improves in-channel error handling. 🥳

If you're not an AppSignal user yet, make sure to check out the product tour and see how errors, performance, host metrics and triggers all come together in one tool.

Phoenix 1.5 Support

Phoenix 1.5 isn't here yet, but AppSignal 1.12 is ready for it 😉

In previous versions, AppSignal’s Phoenix instrumentation depended on the data from the Phoenix instrumenter, which is removed in version 1.5 of the Phoenix framework.

The installation instructions included a step to attach AppSignal’s instrumenter to your application in your app’s configuration:

config :appsignal_phoenix_example, AppsignalPhoenixExampleWeb.Endpoint, #... instrumenters: [Appsignal.Phoenix.Instrumenter]

From Phoenix 1.5 on, the old Phoenix instrumentation is deprecated and removed in favor of the new Telemetry-based instrumentation. This new instrumentation doesn't require any manual setup, as it will hook into Telemetry automatically.

When upgrading to Phoenix 1.5, you’ll see a warning during compilation when using the old instrumenters:

[warn] :instrumenters configuration for AppsignalPhoenixExampleWeb.Endpoint is deprecated and has no effect

To switch to the new instrumentation, make sure you're running version 1.12.0 of the AppSignal integration or higher. Then, remove the instrumenters configuration option from your endpoint configuration. The new instrumentation should appear automatically in your samples as an event named call.phoenix_endpoint.

In case you upgrade your Phoenix app to 1.5 (once it goes out) and don't update your AppSignal for Elixir package to v1.12 or up, you'll stop receiving performance samples from your Phoenix app.

In-channel Error Handling

Version 1.12 also adds improved error handling in Phoenix channels (regardless of the Phoenix version you're running). Instead of placing errors in the "background" namespace, any crashing channel now logs an error in the "channel" namespace, including all relevant metadata, like we do for performance samples.

Please see the changelog for more details about these improvements, deprecations and other changes. And as always: get in touch if you have any questions, compliments, or encounter problems after upgrading. We're happy to help!

Become our next author!

Find out more

AppSignal monitors your apps

AppSignal provides insights for Ruby, Rails, Elixir, Phoenix, Node.js, Express and many other frameworks and libraries. We are located in beautiful Amsterdam. We love stroopwafels. If you do too, let us know. We might send you some!

Discover AppSignal
AppSignal monitors your apps