NAME

WebService::Raygun::Message - A message to be sent to raygun.io

SYNOPSIS

use WebService::Raygun::Message;
my $message = WebService::Raygun::Message->new(
      occurred_on => '2014-06-27T03:15:10+1300',
      error       => "This is my error!",
      environment => {
          processor_count       => 2,
          cpu                   => 34,
          architecture          => 'x84',
          total_physical_memory => 3
      },
      request => HTTP::Request->new(
          POST => 'https://www.null.com',
          [ 'Content-Type' => 'text/html', ]
      ),
);

DESCRIPTION

You generally should not need to create instances of this class

DESCRIPTION

This module assembles a request for raygun.io.

INTERFACE

occurred_on

DateTime|DateTime
string

Should have format YYYY-mm-ddTHH:MM:SSz.

Must be a valid datetime with timezone offset; eg 2014-06-30T04:30:30+100. Defaults to current time.

error

user

Accepts any one of the following:

  • A string containing an email (eg. test@test.com).

  • An integer

  • A HASH (or subhash) of the following:

    {
        identifier   => INT,
        email        => 'test@test.com',
        is_anonymous => 1|0|undef,
        full_name    => 'Firstname Lastname',
        first_name   => 'Firstname',
        uuid         => '783491e1-d4a9-46bc-9fde-9b1dd9ef6c6e'
    }

These will all be coerced into HASH above.

request

Can be an object of type HTTP::Request, Catalyst::Request, Mojo::Message::Request or a HASH.

See WebService::Raygun::Message::Request.

environment

See WebService::Raygun::Message::Environment.

user_custom_data

Some data from the user.

tags

grouping_key

version

machine_name

response_status_code

Default is 200.

client

prepare_raygun

Converts a Perl hash to JSON.

DEPENDENCIES

SEE ALSO

WebService::Raygun::Message::Request
WebService::Raygun::Message::Environment
WebService::Raygun::Message::Error
WebService::Raygun::Message::Error::StackTrace