Net::Airbrake - Airbrake Notifier API V3 Client
use Net::Airbrake; my $airbrake = Net::Airbrake->new( api_key => 'xxxxxxx', project_id => 9999999, ); eval { die 'Oops' }; $airbrake->notify($@);
Net::Airbrake is a client of Airbrake Notifier API V3.
Create a new instance.
Required. API Key of your project.
Required. Project ID.
Optional. The name of environment your application is running. Default value is used $ENV{PLACK_ENV} or 'development'.
Optional. The server base URL to send report. Default is "https://airbrake.io".
Add an error. $error accepts HashRef, Object, string generated by die() or just string message. If you want to send raw error report, use HashRef included following key/value pairs:
Required. Error type.
Required. Error message.
Optional. HashRef can contain followings key/value pairs:
File name an error occurred.
Line number an error occurred.
Subroutine name an error occurred.
Return true value if the instance has been added error by add_error().
Send errors added by add_error() to Airbrake. \%option parameter is optional and all key/value pairs of its also optional. You can specify followings to report error details.
details
Context values of its error.
Environment variables. Set HTTP Headers on web application as usual.
Session values. Set your application session parameters.
Request parameters. Set HTTP Request parameters on web application as usual.
Shortcut of add_error() and send() combination.
Notifier API V3 - https://help.airbrake.io/kb/api-2/notifier-api-v3
Six Apart, Ltd. <sixapart@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::Airbrake, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Airbrake
CPAN shell
perl -MCPAN -e shell install Net::Airbrake
For more information on module installation, please visit the detailed CPAN module installation guide.