tremlab/bugsnag-elm

Send error reports to bugsnag


Keywords
bugsnag, bugsnag-elm, elm-lang
License
BSD-3-Clause
Install
elm-package install tremlab/bugsnag-elm 2.0.0

Documentation

bugsnag-elm Build Status

What?

Log Elm "errors" to bugsnag.

Why?

The whole point of using Elm is to eliminate production errors. So why would I need an error monitor? 🤷🏼‍♀️

Well, the world is still messy, and there may be bizarre edge cases that - while representing a possible state - are quite unpleasant for your user. A service like bugsnag can help you report when these cases occur and track which are the most pernicious areas of your code. You can also just log any activity you like. 👍

This package will only send handled "error" reports to bugsnag when you explicitly call it in your code. I would recommend also configuring bugsnag-js in your compiled elm JS code. This additional layer will catch any wacky, unhandled mayhem that may occur on your project. (E.g. my team has noticed some browser extensions meddling with our Elm code.)

How?

You'll need to set up your own bugsnag account to get the example app working. There is a completely free tier which is great for side projects and just getting used to the tooling.

Once you have an account, create a generic frontend JavaScript project, and copy that api key into the example app.

After you have successfully sent your first error report to bugsnag and got the hang of the dashboard, you can follow the example app's pattern to start adding bugsnag reports in your own project! 🎉

Although bugsnag does not offically support Elm, they have amazing documentation and support. ♥️ And of course, ask questions or offer suggestions here!

Development

  • Before publishing changes you must make sure that the value of Bugsnag.Internal.version matches the version in elm.json. The script scripts/verify-notifier-version.sh will check this for you and also fail the Travis build.