NAME
WebService::Raygun::Message - A message to be sent to raygun.io
SYNOPSIS
use WebService::Raygun::Message;
# The Raygun.io API expects something like this:
my $data = {
'occurredOn' => string, # ISO 8601
'details' => {
'machineName' => string,
'version' => string,
'client' => {
'name' => string,
'version' => string,
'clientUrl' => string
},
'error' => {
'innerError' => string,
'data' => object,
'className' => string,
'message' => string,
'stackTrace' => [
{
'lineNumber' => number,
'className' => string,
'fileName' => string,
'methodName' => string,
}
]
},
'environment' => {
'processorCount' => number,
'osVersion' => string,
'windowBoundsWidth' => number,
'windowBoundsHeight' => number,
'resolutionScale' => string,
'currentOrientation' => string,
'cpu' => string,
'packageVersion' => string,
'architecture' => string,
'totalPhysicalMemory' => number,
'availablePhysicalMemory' => number,
'totalVirtualMemory' => number,
'availableVirtualMemory' => number,
'diskSpaceFree' => array,
'deviceName' => string,
'locale' => string,
},
'tags' => array,
'userCustomData' => object,
'request' => {
'hostName' => string,
'url' => string,
'httpMethod' => string,
'iPAddress' => string,
'queryString' => object,
'form' => object,
'headers' => object,
'rawData' => object,
},
'response' => {
'statusCode' => number
},
'user' => {
'identifier' => string
},
'context' => {
'identifier' => string
}
}
};
DESCRIPTION
This module assembles a request for raygun.io.
INTERFACE
occurred_on
Must be a valid datetime with timezone offset; eg 2014-06-30T04:30:30+100. Defaults to current time.
error
An instance of WebService::Raygun::Message::Error. I am using type constraints to coerce objects of type Moose::Exception, Mojo::Exception, and when possible string stack traces as needed.
user
Can be an email address or some other identifier. Note that if an email address is used, raygun.io will try to find a suitable Gravatar to display in the results.
request
See WebService::Raygun::Message::Request.
environment
See WebService::Raygun::Message::Environment.
user_custom_data
tags
client
version
machine_name
response_status_code
Default is 200.
prepare_raygun
Converts a Perl hash to JSON.