Skip to content
An Airbrake lager backend.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE.md
Makefile
README.md
rebar.config
rebar.lock

README.md

Lager Airbrake

This is a Lager backend for Airbrake. If you are using Lager in your application, this backend will report the errors with the desired level of severity to Airbrake.

Lager Airbrake will try to use some heuristics to optimize the notification sent to Airbrake, so that errors can be easily differentiated.

Install

In your project's rebar.config file, add lager_airbrake as a dependency:

{lager_airbrake, ".*", {git, "git://github.com/ostinelli/lager_airbrake.git", "master"}}

Then include lager_airbrake_backend in your lager configuration:

%% Lager config
{lager, [
    {handlers, [
        %% Add Airbrake monitoring
        {lager_airbrake_backend, [
            {environment, "development"},
            {api_key, "AIRBRAKE_API_KEY"},
            {project_id, "AIRBRAKE_PROJECT_ID"},
            {level, warning},
            {ignore, [
                {file, "my_app_ignored_file.erl"},
                {message, "Ignore message"}
            ]}
        ]},

        [...]
    ]},

[...]
}

ignore is a list that allows you to specify which errors should be ignored, i.e. not notified to AirBrake. You can specify two types of ignore statements:

  • file: the associated regex will be matched against the filename where the error is generated.
  • message: the associated regex will be matched against the error message.

Dependencies

Dependencies are automatically managed by rebar. These are:

Contributing

So you want to contribute? That's great!

Every pull request should have its own topic branch. In this way, every additional adjustments to the original pull request might be done easily, and squashed with git rebase -i. The updated branch will be visible in the same pull request, so there will be no need to open new pull requests when there are changes to be applied.

Do not commit to master in your fork. Provide a clean branch without merge commits.

Legal notice

All product names and trademarks are the property of their respective owners, which are in no way associated or affiliated with the developer.

You can’t perform that action at this time.