The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Sentry::Log::Raven - sending exception log messages to Sentry.

SYNOPSIS

 my $raven = Sentry::Log::Raven->new(
    sentry_public_key => "public",
    sentry_secret_key => "secret",
    domain_url        => "http(s)://sentry domain",
    project_id        => "sentry project id",
    sentry_version    => 4 # can be omitted
    ssl_verify        => 0 # can be omitted

 );


 $raven->message({ message => "Alert!" });

EXPORT

new

Constructor. Use like:

    my $raven = Sentry::Log::Raven->new(
        sentry_public_key => "public",
        sentry_secret_key => "secret",
        domain_url        => "http(s)://sentry domain",
        project_id        => "sentry project id",
        sentry_version    => 4 # can be omitted
        ssl_verify        => 0 # can be omitted
    );

message

Send message to Sentry server.

  $raven->message( { 
    'message'     => "Message", 
    'logger'      => "Name of the logger",                  # defult "root"
    'level'       => "Error level",                         # default 'error'
    'platform'    => "Platform name",                       # default 'perl',
    'culprit'     => "Module or/and function raised error", # default ""
    'tags'        => "Hashref of tags",                     # default {}
    'server_name' => "Server name where error occured",     # current host name is default
    'modules'     => "list of relevant modules",
    'extra'       => "extra params described below"
  } );

The structure of 'modules' list is:

    [
        {
            "my.module.name": "1.0"
        }
    ]

The structure of 'extra' field is:

  {
    "my_key"           => 1,
    "some_other_value" => "foo bar"
  }

LICENSE AND COPYRIGHT

Copyright (C) 2014 by Enginuity Search Media

daniel@theenginuity.com

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0