NAME
WebService::Raygun - Connect to the Raygun.io API
SYNOPSIS
use WebService::Raygun::Messenger;
sub some_post_action {
my ( $self, $request ) = @_;
eval {
# do something with request
# ...
};
if ( my $exception = $@ ) {
# see WebService::Raygun::Message for details
# of request object.
my $message = {
error => $exception,
request => $request
user => 'null@null.com',
client => {
name => 'something',
version => 2,
clientUrl => 'www.null.com'
},
};
# initialise raygun.io messenger
my $raygun = WebService::Raygun::Messenger->new(
api_key => '<your raygun.io api key>',
message => $message
);
# send message to raygun.io
my $response = $raygun->fire_raygun;
}
}
DESCRIPTION
Interface for the Raygun.io API. This is designed to send string or objects in $@
to raygun.io.
SEE ALSO
- WebService::Raygun::Message
-
Constructs the actual message. See this class for a better description of the fields available or required for the raygun.io API.