Packages

A simple Airbrake/Errbit library for Elixir/Phoenix projects. Currently only supports error/exception notifications via a Plug.

Current section

Files

Jump to
airbrakify lib airbrakify.ex
Raw

lib/airbrakify.ex

defmodule Airbrakify do
alias Airbrakify.AirbrakeServer
def notify(%{type: _type, message: _message}=message) do
do_notification(message)
end
def notify(message) when is_binary(message) do
do_notification(%{type: "Custom", message: message})
end
def notify(message) do
do_notification(%{type: "Custom", message: inspect(message)})
end
defp do_notification(message) do
AirbrakeServer.start
AirbrakeServer.notify(message)
end
end