Report Chef exceptions to Airbrake using the airbrake_handler gem.
This cookbook uses the chef_gem resource added in Chef 0.10.10. If you are using an earlier version of Chef, then you can install the chef_gem cookbook which backports this functionality.
node['airbrake_handler']['api_key']- Your Airbrake API Key, required.node['airbrake_handler']['framework_env']- What environment to report to Airbrake, defaults to thenode.chef_environment.node['airbrake_handler']['version']- Set the version of the airbrake_handler gem to install.
Any additional airbrake_handler attributes will be passed directly into the AirbrakeHandler class.
Add recipe[airbrake_handler] to your run list and set the airbrake_handler/api_key attribute.
run_list("recipe[airbrake_handler]")
default_attributes("airbrake_handler" => { "api_key" => "your-airbrake-api-key" })