Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/morgoth/airbrake_handler

Chef handler for sending exceptions to Airbrake
https://github.com/morgoth/airbrake_handler

Last synced: 26 days ago
JSON representation

Chef handler for sending exceptions to Airbrake

Awesome Lists containing this project

README

        

# Airbrake handler for Chef

Report [Chef](http://www.opscode.com/chef) exceptions to [Airbrake](http://airbrake.io)

Works fine with chef versions above 0.9.x

## Usage

```
gem install airbrake_handler
```

In your chef client file (often placed at /etc/chef/client.rb) put:

```ruby
require "airbrake_handler"
exception_handlers << AirbrakeHandler.new(:api_key => "your-airbrake-api-key")
```

You can pass more options to AirbrakeHander initializer, i.e:

```ruby
AirbrakeHandler.new(:api_key => "your-airbrake-api-key", :framework_env => "production")
```

Toadhopper options:

* :api_key
* :notify_host

If you want to ignore specific exceptions, you can do this like that:

```ruby
airbrake_handler = AirbrakeHandler.new(:api_key => "your-airbrake-api-key", :framework_env => "production")
airbrake_handler.ignore << {:class => "SystemExit"}
airbrake_handler.ignore << {:class => "Errno::ECONNRESET", :message => /Connection reset by peer/}
```

### Automation

If you would like to install `airbrake_handler` by Chef itself, you can use cookbook:

[Airbrake Handler Cookbook](https://github.com/cgriego/chef-airbrake_handler)

## Continuous Integration

[![Build Status](https://travis-ci.org/morgoth/airbrake_handler.svg?branch=master)](https://travis-ci.org/morgoth/airbrake_handler)

## Contributors

* [Anton Mironov](https://github.com/mironov)
* [Benedikt Böhm](https://github.com/hollow)
* [Jeroen Jacobs](https://github.com/jeroenj)

## Copyright

Copyright (c) 2012 Adam Jacob, Wojciech Wnętrzak See LICENSE for details.