https://github.com/ostinelli/lager_airbrake
An Airbrake lager backend.
https://github.com/ostinelli/lager_airbrake
Last synced: about 1 year ago
JSON representation
An Airbrake lager backend.
- Host: GitHub
- URL: https://github.com/ostinelli/lager_airbrake
- Owner: ostinelli
- License: mit
- Created: 2015-03-11T13:27:11.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-03-01T16:34:12.000Z (over 8 years ago)
- Last Synced: 2025-03-30T08:24:52.286Z (about 1 year ago)
- Language: Erlang
- Homepage:
- Size: 29.3 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lager Airbrake
This is a [Lager](https://github.com/basho/lager) backend for [Airbrake](https://www.airbrake.io). 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:
```erlang
{lager_airbrake, ".*", {git, "git://github.com/ostinelli/lager_airbrake.git", "master"}}
```
Then include `lager_airbrake_backend` in your `lager` configuration:
```erlang
%% 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](https://github.com/rebar/rebar). These are:
* [iBrowse](https://github.com/cmullaparthi/ibrowse) - HTTP client
* [Jiffy](https://github.com/davisp/jiffy) - JSON encoder
### 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.