NAME
Sentry::Raven - A perl sentry client
VERSION
Version 0.01
SYNOPSIS
my $raven = Sentry::Raven->new(sentry_dsn => 'http://<publickey>:<secretkey>@app.getsentry.com/<projectid>' );
$raven->capture_message('The sky is falling');
DESCRIPTION
This module implements the recommended raven interface for posting events to a sentry service.
SUBROUTINES/METHODS
my $raven = Sentry::Raven->new( %options )
Create a new sentry interface object. It accepts the following named options:
- sentry_dsn =>
'http://<publickey>:<secretkey>@app.getsentry.com/<projectid>'
-
The DSN for your sentry service. Get this from the client configuration page for your project.
- timeout => 5
-
Do not wait longer than this number of seconds when attempting to send an event.
$raven->capture_message( $message, %options )
Post a string message to the sentry service. Returns the event id.
$raven->capture_exception( $exception_type, $exception_value, %options )
Post an exception type and value to the sentry service. Returns the event id.
STANDARD OPTIONS
These options can be passed to all of the capture_*
methods.
- culprit => 'Some::Software'
-
The source of the event. Defaults to
undef
. - event_id =>
'534188f7c1ff4ff280c2e1206c9e0548'
-
The unique identifier string for an event, usually UUID v4. Max 32 characters. Defaults to a new unique UUID for each event. Invalid ids may be discarded silently.
- extra => { key1 => 'val1', ... }
-
Arbitrary key value pairs with extra information about an event. Defaults to
{}
. - level => 'error'
-
Event level of an event. Acceptable values are
fatal
,error
,warning
,info
, anddebug
. Defaults toerror
. - logger => 'root'
-
The creator of an event. Defaults to current user.
- platform => 'perl'
-
The platform (language) in which an event occurred. Defaults to
perl
. - server_name => 'localhost.example.com'
-
The hostname on which an event occurred. Defaults to the system hostname.
-
Arbitrary key value pairs with tags for categorizing an event. Defaults to
{}
. - timestamp => '1970-01-01T00:00:00'
-
Timestamp of an event. ISO 8601 format. Defaults to the current time. Invalid values may be discarded silently.