GitHub - getsentry/raven-php-old: PHP client for sentry

raven-php is an experimental PHP client for Sentry.

// Register the autoloader
require('/path/to/Raven/Autoloader.php');
Raven_Autoloader::register();

// Instantiate a new client with a compatible DSN
$client = new Raven_Client('http://public:secret@example.com/1');

// Capture a message
$event_id = $client->getIdent($client->message('my log message'));

// Capture an exception
$event_id = $client->getIdent($client->exception($ex));

// Give the user feedback
echo "Sorry, there was an error!";
echo "Your reference ID is " . $event_id;

Resources