Git Product home page Git Product logo

airbax's Introduction

Airbax

Build Status Hex Version

Elixir client for Airbrake.

Airbax is a clone of awesome Rollbax, but for Airbrake/Errbit.

Airbax was made by simply replacing 'rollbax' with 'airbax' everywhere in the code, changing Rollbax.Item and Rollbax.Client to make them compatible with Airbrake API specifications and fixing some tests. That's it.
All credits go to Rollbax.

Installation

Add Airbax as a dependency to your mix.exs file:

defp deps() do
  [{:airbax, "0.0.6"}]
end

and add it to your list of applications:

def application() do
  [applications: [:airbax]]
end

Then run mix deps.get in your shell to fetch the dependencies.

Usage

Airbax requires some configuration in order to work. For example, in config/config.exs:

config :airbax,
  project_key: "ffb8056a621f309eeb1ed87fa0c7",
  project_id: true,
  environment: "production"

If you're using Errbit, add to the configuration above an URL of your Errbit service as url parameter.

Then, exceptions (errors, exits, and throws) can be reported to Airbrake or Errbit using Airbax.report/3:

try do
  DoesNotExist.for_sure()
rescue
  exception ->
    Airbax.report(:error, exception, System.stacktrace())
end

Plug and Phoenix

For examples on how to take advantage of Airbax in Plug-based applications (including Phoenix applications), have a look at the "Using Airbax in Plug-based applications" page in the documentation.

Non-production reporting

For non-production environments error reporting can be either disabled completely (by setting :enabled to false) or replaced with logging of exceptions (by setting :enabled to :log).

config :airbax, enabled: :log

License

This software is licensed under the ISC license.

airbax's People

Contributors

cifer-y avatar gaynetdinov avatar lexmag avatar michalmuskala avatar novaugust avatar philss avatar take-five avatar tigerwolf avatar whatyouhide avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.